Function at 0x4ad1e0
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
mov ecx, dword [esi + 0x50]
mov dword [esp + 0x10], ecx
mov eax, dword [ecx]
test al, 4
je 0x4ad211
cmp dword [ecx + 0x34], 0xffff0000
jbe 0x4ad211
pop edi
pop esi
pop ebp
mov dword [0x6950c4], 4
xor eax, eax
pop ebx
pop ecx
ret
test al, 1
jne 0x4ad227
pop edi
pop esi
pop ebp
mov dword [0x6950c4], 0xa
xor eax, eax
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov dword [esi + 0x28], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esi + 0x1c], ebx
test ecx, ecx
setne dl
test edi, edi
mov dword [esi + 0x20], ebp
mov dword [esi + 0x24], eax
mov byte [esi + 0x2c], dl
je 0x4ad27d
mov eax, dword [edi + 0xc]
mov ecx, dword [edi]
push eax
push ecx
call fcn.004aeaf0
add esp, 8
mov dword [esi + 0x30], eax
test eax, eax
jne 0x4ad284
pop edi
pop esi
pop ebp
mov dword [0x6950c4], 7
pop ebx
pop ecx
ret
mov dword [esi + 0x30], 0
mov eax, dword [esi + 0x50]
mov byte [esp + 0x18], 0x2c
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4ad2a2
lea edx, [esp + 0x18]
push 1
push edx
push esi
call ecx
add esp, 0xc
jmp 0x4ad2b8
mov eax, dword [eax + 0x38]
lea ecx, [esp + 0x18]
push eax
push 1
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
push esi
push ebx
call fcn.004ad570
push esi
push ebp
call fcn.004ad570
mov ebx, dword [esp + 0x34]
push esi
push ebx
call fcn.004ad570
mov edx, dword [esp + 0x40]
push esi
push edx
call fcn.004ad570
add esp, 0x20
test edi, edi
je 0x4ad2e9
mov eax, dword [edi + 4]
dec eax
jmp 0x4ad2eb
xor eax, eax
mov edx, dword [esp + 0x2c]
mov ecx, edi
neg ecx
sbb cl, cl
and ecx, 0x80
neg edx
sbb dl, dl
and edx, 0x40
or cl, dl
or cl, al
mov eax, dword [esi + 0x50]
mov byte [esp + 0x18], cl
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4ad323
lea eax, [esp + 0x18]
push 1
push eax
push esi
call ecx
add esp, 0xc
jmp 0x4ad339
mov ecx, dword [eax + 0x38]
lea edx, [esp + 0x18]
push ecx
push 1
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
test edi, edi
je 0x4ad3a1
mov eax, dword [edi]
xor ebp, ebp
test eax, eax
jle 0x4ad3a1
xor ebx, ebx
mov eax, dword [edi + 0xc]
add eax, ebx
mov cl, byte [eax]
mov byte [esp + 0x18], cl
mov dl, byte [eax + 1]
mov byte [esp + 0x19], dl
mov al, byte [eax + 2]
mov byte [esp + 0x1a], al
mov eax, dword [esi + 0x50]
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x4ad379
lea edx, [esp + 0x18]
push 3
push edx
push esi
call ecx
add esp, 0xc
jmp 0x4ad38f
mov eax, dword [eax + 0x38]
lea ecx, [esp + 0x18]
push eax
push 3
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 3
jne 0x4ad3c1
add ebx, eax
mov eax, dword [edi]
inc ebp
cmp ebp, eax
jl 0x4ad347
mov ebx, dword [esp + 0x24]
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x4ad3d3
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x4ad3d3
pop edi
pop esi
pop ebp
mov dword [0x6950c4], 5
xor eax, eax
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov dword [0x6950c4], 2
xor eax, eax
pop ebx
pop ecx
ret
imul ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
push esi
mov edx, dword [eax]
mov dword [eax + 0x34], ebx
or edx, 4
mov dword [eax], edx
call fcn.004ad5d0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret