Function at 0x475740
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x38], 4
cmp dword [ebp + 0xc], 0x6400000
jbe 0x47576a
jmp 0x47592d
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x14
push 0
lea ecx, [ebp - 0x14]
push ecx
call fcn.00453b10
add esp, 0xc
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x10]
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x2c]
push edx
push 4
lea eax, [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x475802
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x475802
jmp 0x47592d
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x24]
push eax
push 4
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x475825
jmp 0x47592d
push 0
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x47584a
cmp dword [ebp - 0x2c], 4
je 0x475854
jmp 0x47592d
mov dword [ebp - 0x3c], 0
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x14
push 0
lea ecx, [ebp - 0x14]
push ecx
call fcn.00453b10
add esp, 0xc
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 0x10]
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x4758bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4758bd
jmp 0x47592d
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x24]
push ecx
push 4
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x4758da
jmp 0x47592d
push 0
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4758ff
cmp dword [ebp - 0x2c], 0
jne 0x475903
jmp 0x47592d
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x3c]
cmp eax, dword [ebp + 0xc]
jne 0x475910
jmp 0x475926
mov ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], ecx
mov edx, 1
test edx, edx
jne 0x47585b
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x28]
mov esp, ebp
pop ebp
ret 8