Function at 0x4051c7
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40888a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc8
mov dword [ebp - 0xd4], ecx
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0xd4]
cmp dword [ecx + 0x10c], 0
jle 0x405223
mov edx, dword [ebp - 0xd4]
mov eax, dword [edx + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0xd4]
add ecx, 0x148
push ecx
lea edx, [ebp - 0xcc]
push edx
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0xd4]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4054eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x3e5
jne 0x4054ac
push 1
lea ecx, [ebp - 0xcc]
push ecx
mov edx, dword [ebp - 0xd4]
add edx, 0x148
push edx
mov eax, dword [ebp - 0xd4]
mov ecx, dword [eax + 0x134]
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4053c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x3e4
jne 0x405309
push 0
push 0
mov edx, dword [ebp - 0xd4]
mov eax, dword [edx + 0x20]
push eax
lea ecx, [ebp - 0x48]
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x4052ee
lea edx, [ebp - 0x48]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov ecx, dword [ebp - 0xd4]
cmp dword [ecx + 0x12c], 0
je 0x405304
xor eax, eax
jmp 0x4054f0
jmp 0x40527b
mov edx, dword [ebp - 0x2c]
push edx
push 0x40a1f8
lea eax, [ebp - 0xc8]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0xd4]
mov ecx, dword [eax + 0x134]
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
cmp dword [ebp - 0x1c], 0
jbe 0x40537a
mov edx, dword [ebp - 0x1c]
push edx
push 0x40a200
lea eax, [ebp - 0xc8]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0xc8]
push ecx
push 0x3f3
mov ecx, dword [ebp - 0xd4]
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ecx, eax
call sub.MFC42.DLL_CWnd::SetWindowTextA
push 0
push 0
mov edx, dword [ebp - 0xd4]
mov eax, dword [edx + 0x20]
push eax
lea ecx, [ebp - 0x48]
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x4053aa
lea edx, [ebp - 0x48]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov ecx, dword [ebp - 0xd4]
cmp dword [ecx + 0x12c], 0
je 0x4053c0
xor eax, eax
jmp 0x4054f0
jmp 0x40527b
mov edx, dword [ebp - 0x14]
add edx, dword [ebp - 0xcc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
je 0x405408
mov ecx, dword [ebp - 0xd4]
cmp dword [ecx + 0x13c], 0
je 0x405403
mov edx, dword [ebp - 0xd4]
cmp dword [edx + 0x12c], 0
je 0x4053fe
xor eax, eax
jmp 0x4054f0
jmp 0x405201
jmp 0x4054aa
mov eax, dword [ebp - 0xd4]
mov ecx, dword [eax + 0x194]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0xd4]
mov dword [edx + 0x194], ecx
lea ecx, [ebp - 0xd0]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xd4]
call fcn.00407bc0
test eax, eax
jne 0x405498
push 0x6a
lea ecx, [ebp - 0xd0]
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [ebp - 0xd4]
mov ecx, dword [eax + 0x194]
push ecx
lea ecx, [ebp - 0xd0]
call fcn.00401900
push eax
lea edx, [ebp - 0xc8]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0xc8]
push eax
push 0x3f3
mov ecx, dword [ebp - 0xd4]
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ecx, eax
call sub.MFC42.DLL_CWnd::SetWindowTextA
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xd0]
call fcn.00407f68
jmp 0x4054eb
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0xcc]
mov dword [ebp - 0x14], ecx
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0xd4]
mov edx, dword [ecx + 0x134]
push edx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov eax, dword [ebp - 0xd4]
cmp dword [eax + 0x12c], 0
je 0x4054e6
xor eax, eax
jmp 0x4054f0
jmp 0x405201
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8