Function at 0x418ca0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff10
cmp dword [ebp + 8], 0
jne 0x418cb6
xor eax, eax
jmp 0x418f87
push dword [ebp + 0x10]
push str.Wr_n_d__
call fcn.0040391c
add esp, 8
xor edx, edx
mov dword [ebp - 0x1c], edx
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp + 0x10]
jge 0x418d64
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
cmp byte [ecx + edx], 0x20
jb 0x418d35
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
cmp byte [edx + eax], 0x7f
jae 0x418d35
cmp dword [ebp - 0x1c], 0
je 0x418d15
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [eax + ecx]
push edx
push str.__c
call fcn.0040391c
add esp, 8
jmp 0x418d2e
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [eax + ecx]
push edx
push 0x45740d
call fcn.0040391c
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
jmp 0x418d55
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [edx + eax]
push ecx
push str._0x_02X
call fcn.0040391c
add esp, 8
mov dword [ebp - 0x1c], 1
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp + 0x10]
jl 0x418cdc
push 0x45741a
call fcn.0040391c
pop ecx
xor edx, edx
mov dword [ebp - 8], edx
mov ecx, dword [ebp + 8]
add ecx, 4
push ecx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push dword [edx]
call sub.KERNEL32.DLL_WriteFile
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x418f7e
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x3e5
jne 0x418f25
push 0x1388
mov ecx, dword [ebp + 8]
push dword [ecx + 0x14]
call sub.KERNEL32.DLL_WaitForSingleObject
sub eax, 1
jb 0x418dd6
sub eax, 0x101
je 0x418e60
jmp 0x418ec4
push 0
lea eax, [ebp - 4]
push eax
mov edx, dword [ebp + 8]
add edx, 4
push edx
mov ecx, dword [ebp + 8]
push dword [ecx]
call sub.KERNEL32.DLL_GetOverlappedResult
test eax, eax
jne 0x418e55
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x10], eax
push 0
push 0xc7
lea eax, [ebp - 0xf0]
push eax
push 0
push dword [ebp - 0x10]
push 0
push 0x1000
call sub.KERNEL32.DLL_FormatMessageA
lea edx, [ebp - 0xf0]
push edx
push dword [ebp - 0x10]
push str.Wr_dwError01__0x_08X__s_r_n
call fcn.0040391c
add esp, 0xc
lea ecx, [ebp - 0x28]
push ecx
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp + 8]
push dword [edx]
call sub.KERNEL32.DLL_ClearCommError
push 0xf
mov ecx, dword [ebp + 8]
push dword [ecx]
call sub.KERNEL32.DLL_PurgeComm
or eax, 0xffffffff
jmp 0x418f87
mov edx, dword [ebp - 4]
add dword [ebp - 8], edx
jmp 0x418f84
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x10], eax
push 0
push 0xc7
lea ecx, [ebp - 0xf0]
push ecx
push 0
push dword [ebp - 0x10]
push 0
push 0x1000
call sub.KERNEL32.DLL_FormatMessageA
lea eax, [ebp - 0xf0]
push eax
push dword [ebp - 0x10]
push str.Wr_dwError02__0x_08X__s_r_n
call fcn.0040391c
add esp, 0xc
lea edx, [ebp - 0x28]
push edx
lea ecx, [ebp - 0xc]
push ecx
mov eax, dword [ebp + 8]
push dword [eax]
call sub.KERNEL32.DLL_ClearCommError
push 0xf
mov edx, dword [ebp + 8]
push dword [edx]
call sub.KERNEL32.DLL_PurgeComm
or eax, 0xffffffff
jmp 0x418f87
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x10], eax
push 0
push 0xc7
lea edx, [ebp - 0xf0]
push edx
push 0
push dword [ebp - 0x10]
push 0
push 0x1000
call sub.KERNEL32.DLL_FormatMessageA
lea ecx, [ebp - 0xf0]
push ecx
push dword [ebp - 0x10]
push str.Wr_dwError03__0x_08X__s_r_n
call fcn.0040391c
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0xc]
push edx
mov ecx, dword [ebp + 8]
push dword [ecx]
call sub.KERNEL32.DLL_ClearCommError
push 0xf
mov eax, dword [ebp + 8]
push dword [eax]
call sub.KERNEL32.DLL_PurgeComm
or eax, 0xffffffff
jmp 0x418f87
push 0
push 0xc7
lea edx, [ebp - 0xf0]
push edx
push 0
push dword [ebp - 0x10]
push 0
push 0x1000
call sub.KERNEL32.DLL_FormatMessageA
lea ecx, [ebp - 0xf0]
push ecx
push dword [ebp - 0x10]
push str.Wr_dwError04__0x_08X__s_r_n
call fcn.0040391c
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0xc]
push edx
mov ecx, dword [ebp + 8]
push dword [ecx]
call sub.KERNEL32.DLL_ClearCommError
push 0xf
mov eax, dword [ebp + 8]
push dword [eax]
call sub.KERNEL32.DLL_PurgeComm
or eax, 0xffffffff
jmp 0x418f87
mov edx, dword [ebp - 4]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret