Function at 0x4e1530
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
test dword [esi + 0x18], 0x200
je 0x4e159e
cmp dword [esi + 0xc], 0
jne 0x4e159e
push 0x14
push dword [esi]
call fcn.004dde90
push 0
push 0
xorps xmm0, xmm0
movups xmmword [eax], xmm0
push 0
mov dword [eax + 0x10], 0
push 0
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x10], eax
mov eax, dword [esi + 0xc]
cmp dword [eax + 0x10], 0
jne 0x4e159e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x4e1590
pop esi
add esp, 0xc
ret 0xc
call esi
add eax, 0xafc80
pop esi
add esp, 0xc
ret 0xc
cmp byte [esi + 0x2c], 0
push ebx
push edi
je 0x4e1725
test dword [esi + 0x18], 0x200
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
mov dword [esp + 0x24], eax
je 0x4e15cd
push dword [esi + 0x58]
call fcn.004e8120
cmp dword [esi + 0x48], 0
jne 0x4e1618
mov edx, dword [esi + 0x3c]
xor ecx, ecx
sub edx, dword [esi + 0x44]
mov edi, dword [esi + 0x54]
sbb ecx, ecx
add edx, dword [esi + 0x50]
adc ecx, edi
mov dword [esp + 0x20], ecx
cmp edx, dword [esi + 0x50]
jne 0x4e15f2
cmp ecx, edi
je 0x4e1603
push 0
lea eax, [esp + 0x24]
push eax
push edx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0x44], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x48], 1
mov eax, dword [esp + 0x24]
xor ebx, ebx
mov dword [esp + 0x20], ebx
test eax, eax
je 0x4e1709
mov edi, dword [esi + 0x3c]
mov ebx, dword [esi + 0x40]
cmp edi, ebx
jne 0x4e16d2
cmp byte [esi + 0x2c], 0
mov dword [esp + 0x20], 0
je 0x4e16d2
cmp dword [esi + 0x48], 1
mov dword [esp + 0x1c], 0
jne 0x4e16cc
test edi, edi
je 0x4e16cc
mov ebx, dword [esi + 0x38]
nop
push 0
lea eax, [esp + 0x20]
push eax
push edi
push ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4e1689
mov eax, dword [esp + 0x1c]
add dword [esi + 0x50], eax
adc dword [esi + 0x54], 0
add ebx, eax
sub edi, eax
jne 0x4e1660
jmp 0x4e16c1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
jne 0x4e16a6
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
add dword [esi + 0x50], eax
adc dword [esi + 0x54], 0
jmp 0x4e16c1
call ebx
lea ecx, [eax + 0xafc80]
mov eax, dword [esp + 0x1c]
add dword [esi + 0x50], eax
mov dword [esp + 0x20], ecx
adc dword [esi + 0x54], 0
test ecx, ecx
jne 0x4e16c8
mov dword [esi + 0x3c], 0
mov eax, dword [esp + 0x24]
mov ebx, dword [esi + 0x40]
mov edi, dword [esi + 0x3c]
sub ebx, edi
cmp eax, ebx
cmovbe ebx, eax
mov eax, dword [esi + 0x38]
push ebx
push dword [esp + 0x14]
add eax, edi
push eax
call fcn.004b6e60
mov eax, dword [esp + 0x30]
add esp, 0xc
add dword [esi + 0x3c], ebx
sub eax, ebx
add dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
test ebx, ebx
je 0x4e1622
test dword [esi + 0x18], 0x200
je 0x4e171a
push dword [esi + 0x58]
call fcn.004e8180
pop edi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret 0xc
cmp byte [esi + 8], 0
jne 0x4e17ce
cmp dword [esi + 0x34], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x10], xmm0
je 0x4e177a
push dword [esi + 0x58]
call fcn.004e8120
push 2
push esi
call fcn.004e8ab0
mov edi, eax
test edi, edi
je 0x4e1767
push dword [esi + 0x58]
call fcn.004e8180
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0xc
ret 0xc
lea eax, [esp + 0x10]
push eax
push 2
push esi
call fcn.004e87f0
mov edi, eax
test edi, edi
jne 0x4e1754
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4e179d
mov eax, dword [esi + 0x50]
mov dword [ecx + 8], eax
mov cl, 0x20
mov eax, dword [esi + 0x50]
mov edx, dword [esi + 0x54]
call fcn.00501280
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0xc]
mov ebx, dword [esp + 0x24]
lea eax, [esp + 0xc]
push ecx
push eax
push dword [ebx]
push dword [esp + 0x2c]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esi + 0x34], 0
mov edi, eax
je 0x4e17eb
push esi
call fcn.004e8b90
push dword [esi + 0x58]
call fcn.004e8180
jmp 0x4e17eb
push dword [esi + 0xc]
mov ebx, dword [esp + 0x28]
lea eax, [esp + 0x10]
push eax
push dword [ebx]
push dword [esp + 0x2c]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
je 0x4e17fc
mov eax, dword [esp + 0xc]
xor edi, edi
mov dword [ebx], eax
jmp 0x4e18e4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], 0
call edi
test eax, eax
jne 0x4e1815
xor edi, edi
jmp 0x4e18e4
call edi
lea edi, [eax + 0xafc80]
cmp edi, 0xb0065
jne 0x4e18e0
mov edx, dword [esi + 0x10]
mov eax, edx
mov ecx, dword [esi + 0x14]
or eax, ecx
je 0x4e1852
test ecx, ecx
jg 0x4e1844
jl 0x4e183f
test edx, edx
jae 0x4e1844
or eax, 0xffffffff
jmp 0x4e1852
push 0
push 0x3e8
push ecx
push edx
call fcn.004b5860
mov ecx, dword [esi + 0xc]
push eax
mov dword [esp + 0x28], eax
push dword [ecx + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
cmp edi, 0xffffffff
je 0x4e18a7
test edi, edi
je 0x4e188a
cmp edi, 0x102
jne 0x4e18c3
cmp dword [esp + 0x24], 0
mov edi, 0x11177
mov eax, 0xb
cmove edi, eax
jmp 0x4e18bf
push 1
lea eax, [esp + 0x10]
push eax
push dword [esi + 0xc]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov eax, dword [esp + 0xc]
xor edi, edi
mov dword [ebx], eax
jmp 0x4e18e4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jne 0x4e18b7
xor edi, edi
jmp 0x4e18e4
call edi
lea edi, [eax + 0xafc80]
test edi, edi
je 0x4e18e4
cmp dword [0x560ea8], 0xe
jl 0x4e18f9
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0xc
ret 0xc
test edi, edi
jne 0x4e18f9
cmp dword [esi + 0xc], 0
je 0x4e18f9
cmp byte [esi + 8], 0
jne 0x4e18f9
mov eax, dword [ebx]
add dword [esi + 0x50], eax
adc dword [esi + 0x54], 0
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0xc
ret 0xc