Function at 0x4f1b10
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
xor edi, edi
cmp dword [ecx + 0x40], 0
je 0x4f1c9b
mov esi, ecx
mov ecx, dword [ecx + 0x44]
test ecx, ecx
je 0x4f1cb0
mov eax, dword [esi + 0x54]
test al, 0x10
jne 0x4f1b61
test al, 8
je 0x4f1c99
mov eax, dword [esi + 0x4c]
mov dword [esp], eax
cmp byte [esi + 0x5a], 0
je 0x4f1be5
mov ecx, dword [esi + 0x10]
xor ebx, ebx
sub ecx, dword [esi + 0xc]
mov eax, ecx
sar eax, 0x1f
jmp 0x4f1c4a
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x14]
je 0x4f1b7b
mov eax, dword [esi]
mov ecx, esi
push 0xffffffffffffffff
call dword [eax + 0x34]
cmp eax, 0xffffffff
je 0x4f1c63
lea ebp, [esi + 0x48]
nop
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x34]
lea ebx, [esp + 4]
mov edi, dword [ecx]
add edx, eax
push ebx
push edx
push eax
push ebp
call dword [edi + 0x14]
mov ebx, eax
mov edi, dword [esp + 4]
mov eax, dword [esi + 0x20]
sub edi, eax
push dword [esi + 0x40]
push edi
push 1
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp eax, edi
mov edi, 0xffffffff
jne 0x4f1c9b
cmp ebx, 1
je 0x4f1b80
cmp ebx, 2
je 0x4f1c9b
push dword [esi + 0x40]
call sub.msvcrt.dll_fflush
add esp, 4
test eax, eax
jne 0x4f1c9b
jmp 0x4f1c99
mov eax, dword [ecx]
call dword [eax + 0x18]
mov edx, dword [esi + 0x24]
mov edi, dword [esi + 0x28]
sub edi, edx
test eax, eax
jle 0x4f1c11
mov ecx, dword [esi + 0x10]
mov edx, edi
sar edx, 0x1f
sub ecx, dword [esi + 0xc]
imul ecx, eax
mov eax, ecx
sar eax, 0x1f
add ecx, edi
adc eax, edx
xor ebx, ebx
jmp 0x4f1c4a
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 0x10]
je 0x4f1ca5
mov ecx, dword [esi + 0x44]
sub eax, dword [esi + 8]
mov ebx, edi
sar ebx, 0x1f
mov ebp, dword [ecx]
push eax
push edx
push dword [esi + 0x20]
lea eax, [esp + 0xc]
push eax
call dword [ebp + 0x20]
mov ecx, dword [esi + 0x24]
sub ecx, eax
sub ecx, dword [esi + 0x20]
mov eax, ecx
sar eax, 0x1f
add ecx, edi
adc eax, ebx
mov bl, 1
xor edx, edx
neg ecx
sbb edx, eax
push 1
push edx
push ecx
push dword [esi + 0x40]
call fcn.004c2710
add esp, 0x10
test eax, eax
je 0x4f1c6a
mov edi, 0xffffffff
jmp 0x4f1c9b
test bl, bl
je 0x4f1c74
mov eax, dword [esp]
mov dword [esi + 0x48], eax
mov eax, dword [esi + 0x20]
mov dword [esi + 0x28], eax
mov dword [esi + 0x24], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x54], 0
xor edi, edi
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, edi
xor ebx, ebx
mov ecx, edi
jmp 0x4f1b59
call fcn.005010a0
nop
nop
nop
nop
nop
nop
push edi
push esi
mov eax, dword [ecx]
mov edi, dword [esp + 0xc]
mov esi, ecx
call dword [eax + 0x18]
mov eax, dword [0x539190]
mov ecx, edi
push eax
call fcn.00481420
mov dword [esi + 0x44], eax
mov ecx, eax
mov edx, dword [eax]
movzx edi, byte [esi + 0x5a]
call dword [edx + 0x1c]
movzx ecx, al
mov byte [esi + 0x5a], al
cmp edi, ecx
je 0x4f1da4
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x18], 0
test al, al
mov cl, byte [esi + 0x58]
je 0x4f1d61
test cl, cl
je 0x4f1d3b
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4f1d3b
push eax
call fcn.00493d20
add esp, 4
mov al, byte [esi + 0x59]
mov byte [esi + 0x58], al
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov dword [esi + 0x34], ecx
mov dword [esi + 0x20], eax
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov byte [esi + 0x59], 0
jmp 0x4f1da4
test cl, cl
je 0x4f1d7d
mov eax, dword [esi + 0x34]
mov dword [esi + 0x3c], eax
push eax
call fcn.00493c40
add esp, 4
mov dword [esi + 0x38], eax
mov byte [esi + 0x59], 1
jmp 0x4f1da4
mov eax, dword [esi + 0x20]
lea ecx, [esi + 0x2c]
cmp eax, ecx
je 0x4f1d65
mov ecx, dword [esi + 0x34]
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x38], eax
mov byte [esi + 0x59], 0
push ecx
call fcn.00493c40
add esp, 4
mov dword [esi + 0x20], eax
mov byte [esi + 0x58], 1
pop esi
pop edi
ret 4