Function at 0x40fd10
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4381f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
mov ecx, dword [0x446b48]
xor eax, eax
mov dword [esp + 0x18], eax
push ebx
mov dword [esp + 0x20], eax
push ebp
xor ebx, ebx
mov dword [esp + 0x28], eax
push esi
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ecx
mov edi, 1
push ebx
push ebx
push edi
push ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x2c], edi
mov byte [esp + 0x22], al
mov byte [esp + 0x23], al
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebx
mov dword [esp + 0x34], eax
jne 0x40fd91
or edi, 0xffffffff
push edi
push ebx
push 0xe3
call fcn.00431d0a
jmp 0x4103a5
mov esi, dword [esp + 0x6c]
cmp esi, ebx
jge 0x40fde2
push 5
lea edx, [esp + 0x18]
push 0xe4
push edx
call fcn.00429191
mov eax, dword [esp + 0x20]
add esp, 0xc
push ebx
push ebx
push eax
call fcn.00431cd2
lea ecx, [esp + 0x14]
mov dword [esp + 0x5c], 0xffffffff
call fcn.0042ab0d
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
cmp dword [0x44b260], edi
jne 0x410084
mov eax, dword [esp + 0x68]
mov ebp, dword [esp + 0x64]
lea ecx, [esp + 0x24]
lea edx, [esp + 0x18]
push ecx
push edx
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x410036
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x40fe4c
or edi, 0xffffffff
push edi
push ebx
push 0xe5
call fcn.00431d0a
push edi
push ebx
push 0xe6
call fcn.00431d0a
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov ecx, dword [esp + 0x34]
push ecx
jmp 0x41039f
mov edx, dword [esp + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xa
push edx
call ebx
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
mov esi, eax
test esi, esi
je 0x40fef2
call fcn.004108b0
push 1
push 0
push 0
lea eax, [esp + 0x44]
push 0
push eax
call edi
test eax, eax
je 0x40fec4
call fcn.004338c1
mov eax, dword [eax + 4]
lea ecx, [esp + 0x38]
push ecx
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x58]
test eax, eax
jne 0x40feb1
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
lea ecx, [esp + 0x44]
push 0
push ecx
call edi
test eax, eax
jne 0x40fe83
mov eax, dword [0x44b258]
cmp dword [eax + 0x64], 1
je 0x40ff82
cmp esi, 0x102
jne 0x40ffaa
mov edx, dword [esp + 0x34]
push 0xa
push edx
call ebx
mov esi, eax
test esi, esi
jne 0x40fe6b
call fcn.004108b0
push 1
push 0
push 0
lea eax, [esp + 0x44]
push 0
push eax
call edi
test eax, eax
je 0x40ff4b
call fcn.004338c1
mov eax, dword [eax + 4]
lea ecx, [esp + 0x38]
push ecx
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x58]
test eax, eax
jne 0x40ff38
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
lea ecx, [esp + 0x44]
push 0
push ecx
call edi
test eax, eax
jne 0x40ff0a
mov eax, dword [0x44b258]
cmp dword [eax + 0x64], 1
jne 0x40ffeb
push 1
push ebp
mov dword [eax + 0x64], 0
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x5c], 0xffffffff
jmp 0x4103a9
push 1
push ebp
mov dword [eax + 0x64], 0
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x5c], 0xffffffff
jmp 0x4103a9
or edi, 0xffffffff
push edi
cmp esi, edi
push 0
push 0xe7
je 0x40ffc6
call fcn.00431d0a
push edi
push 0
jmp 0x40fe2f
call fcn.00431d0a
push edi
push 0
push 0xe6
call fcn.00431d0a
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [esp + 0x34]
push edx
jmp 0x41039f
lea eax, [esp + 0x18]
push 0
lea ecx, [esp + 0x28]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x18]
cmp eax, edx
je 0x41002f
or edi, 0xffffffff
push edi
push 0
push 0xe8
call fcn.00431d0a
push edi
push 0
push 0xe6
call fcn.00431d0a
push 1
push ebp
jmp 0x410394
mov ecx, dword [esp + 0x34]
push ecx
jmp 0x410067
lea edx, [esp + 0x18]
push ebx
lea eax, [esp + 0x28]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp dword [esp + 0x18], esi
je 0x41005d
or edi, 0xffffffff
push edi
push ebx
push 0xe8
jmp 0x40fe28
call fcn.004108b0
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x44caf4]
add ecx, eax
mov dword [0x44caf4], ecx
jmp 0x41027f
mov ebp, dword [sym.imp.USER32.dll_PeekMessageA]
xor ecx, ecx
xor edi, edi
lea eax, [esp + 0x12]
cmp dword [esp + 0x1c], ebx
je 0x4100d6
mov edx, dword [esp + 0x6c]
mov esi, dword [esp + 0x20]
cmp esi, edx
jge 0x4100c2
mov edx, dword [esp + 0x68]
inc ecx
inc eax
mov dl, byte [edx]
mov byte [eax - 1], dl
mov edx, dword [esp + 0x68]
inc edx
inc edi
mov dword [esp + 0x68], edx
mov edx, esi
inc edx
mov dword [esp + 0x20], edx
jmp 0x4100d1
cmp ecx, ebx
je 0x410274
mov byte [eax], 0
mov dword [esp + 0x1c], ebx
cmp ecx, 1
jl 0x410092
cmp dword [esp + 0x1c], 1
jne 0x4100e0
mov byte [eax], 0
mov esi, dword [esp + 0x64]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x1a]
push edi
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x410234
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4102a8
mov eax, dword [esp + 0x34]
push 0x14
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
cmp esi, ebx
je 0x4101b0
call fcn.004108b0
push 1
push ebx
push ebx
lea ecx, [esp + 0x44]
push ebx
push ecx
call ebp
test eax, eax
je 0x41017e
call fcn.004338c1
mov eax, dword [eax + 4]
lea ecx, [esp + 0x38]
push ecx
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x58]
test eax, eax
jne 0x41016e
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push ebx
push ebx
lea ecx, [esp + 0x44]
push ebx
push ecx
call ebp
test eax, eax
jne 0x410140
mov eax, dword [0x44b258]
cmp dword [eax + 0x64], 1
je 0x4102d6
cmp esi, 0x102
jne 0x4102fe
mov edx, dword [esp + 0x34]
push 0x14
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
cmp esi, ebx
jne 0x41012b
call fcn.004108b0
push 1
push ebx
push ebx
lea eax, [esp + 0x44]
push ebx
push eax
call ebp
test eax, eax
je 0x410203
call fcn.004338c1
mov eax, dword [eax + 4]
lea ecx, [esp + 0x38]
push ecx
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x58]
test eax, eax
jne 0x4101f3
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push ebx
push ebx
lea ecx, [esp + 0x44]
push ebx
push ecx
call ebp
test eax, eax
jne 0x4101c5
mov eax, dword [0x44b258]
cmp dword [eax + 0x64], 1
je 0x4102d6
mov esi, dword [esp + 0x64]
lea edx, [esp + 0x18]
push ebx
lea eax, [esp + 0x28]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp dword [esp + 0x18], edi
jne 0x41034b
jmp 0x410255
lea ecx, [esp + 0x18]
push ebx
lea edx, [esp + 0x28]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp dword [esp + 0x18], edi
jne 0x410376
call fcn.004108b0
mov eax, dword [esp + 0x18]
mov ecx, dword [0x44caf4]
add ecx, eax
mov eax, dword [esp + 0x1c]
cmp eax, 1
mov dword [0x44caf4], ecx
je 0x41008a
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
mov dword [esp + 0x5c], 0xffffffff
call fcn.0042ab0d
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
or edi, 0xffffffff
push edi
push ebx
push 0xe5
call fcn.00431d0a
push edi
push ebx
push 0xe6
call fcn.00431d0a
push 1
push esi
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [esp + 0x34]
push edx
jmp 0x41039f
mov dword [eax + 0x64], ebx
mov eax, dword [esp + 0x64]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x5c], 0xffffffff
jmp 0x4103a9
or edi, 0xffffffff
push edi
cmp esi, edi
push ebx
push 0xe7
je 0x410326
call fcn.00431d0a
push edi
push ebx
push 0xe6
call fcn.00431d0a
mov edx, dword [esp + 0x64]
push 1
push edx
jmp 0x410394
call fcn.00431d0a
push edi
push ebx
push 0xe6
call fcn.00431d0a
mov ecx, dword [esp + 0x64]
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [esp + 0x34]
push edx
jmp 0x41039f
or edi, 0xffffffff
push edi
push ebx
push 0xe8
call fcn.00431d0a
push edi
push ebx
push 0xe6
call fcn.00431d0a
push 1
push esi
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [esp + 0x34]
push edx
jmp 0x41039f
or edi, 0xffffffff
push edi
push ebx
push 0xe8
call fcn.00431d0a
push edi
push ebx
push 0xe6
call fcn.00431d0a
push 1
push esi
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x5c], edi
lea ecx, [esp + 0x14]
call fcn.0042ab0d
mov ecx, dword [esp + 0x54]
pop edi
pop esi
pop ebp
mov eax, 0xc
pop ebx
mov dword fs:[0], ecx
add esp, 0x50
ret