Function at 0x402220
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5eec37
mov eax, dword fs:[0]
push eax
sub esp, 0x178
mov eax, dword [0x66d4f4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x15c], ecx
lea eax, [ebp - 0xe8]
push eax
call fcn.004040c0
mov ecx, eax
call fcn.004088e0
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 0x164], ecx
mov dword [ebp - 4], 0
push 0x639dd0
mov edx, dword [ebp - 0x164]
push edx
lea eax, [ebp - 0x104]
push eax
call fcn.004041b0
add esp, 0xc
mov dword [ebp - 0x168], eax
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0x16c], ecx
mov byte [ebp - 4], 1
push 0x639dcc
mov edx, dword [ebp - 0x16c]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.004041b0
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x104]
call fcn.0040b640
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xe8]
call fcn.0040b640
push str.actionp2p.log
lea ecx, [ebp - 0x2c]
call fcn.004024c0
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0040b660
mov byte [ebp - 4], 5
push 0x639de4
lea ecx, [ebp - 0x2c]
call fcn.0040b520
push eax
call fcn.005bd438
add esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x402485
lea edx, [ebp - 0x120]
push edx
call fcn.00508960
add esp, 4
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x174], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x174]
call fcn.0040b520
push eax
call sub.KERNEL32.dll_GetCurrentThreadId
push eax
push str._ThreadId_lu__t__s__r_n
push 0x80
lea ecx, [ebp - 0xcc]
push ecx
call fcn.005bd516
add esp, 0x14
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x120]
call fcn.0040b640
lea edx, [ebp - 0xcc]
mov dword [ebp - 0x178], edx
mov eax, dword [ebp - 0x178]
add eax, 1
mov dword [ebp - 0x17c], eax
mov ecx, dword [ebp - 0x178]
mov dl, byte [ecx]
mov byte [ebp - 0x17d], dl
add dword [ebp - 0x178], 1
cmp byte [ebp - 0x17d], 0
jne 0x40239e
mov eax, dword [ebp - 0x178]
sub eax, dword [ebp - 0x17c]
mov dword [ebp - 0x184], eax
mov ecx, dword [ebp - 0x30]
push ecx
push 1
mov edx, dword [ebp - 0x184]
push edx
lea eax, [ebp - 0xcc]
push eax
call fcn.005bd6b0
add esp, 0x10
push 0x639e00
lea ecx, [ebp - 0x13c]
call fcn.0040b540
mov byte [ebp - 4], 7
push 0x639e04
lea ecx, [ebp - 0x158]
call fcn.0040b540
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x13c]
push ecx
lea edx, [ebp - 0x158]
push edx
lea eax, [ebp - 0x4c]
push eax
call fcn.00510470
add esp, 0xc
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x158]
call fcn.0040b640
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x13c]
call fcn.0040b640
lea ecx, [ebp - 0x4c]
call fcn.0040b520
push eax
push 0x639e08
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.005bd732
add esp, 0xc
mov edx, dword [ebp - 0x30]
push edx
push 1
push 2
push 0x639e0c
call fcn.005bd6b0
add esp, 0x10
mov eax, dword [ebp - 0x30]
push eax
call fcn.005bd8f3
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x4c]
call fcn.0040b640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.0040b640
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005bd2d7
mov esp, ebp
pop ebp
ret 4