Function at 0x402220
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dcdd7
mov eax, dword fs:[0]
push eax
sub esp, 0x178
mov eax, dword [0x65d4e4]
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.00404970
mov ecx, eax
call fcn.004091d0
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 0x164], ecx
mov dword [ebp - 4], 0
push 0x62aa54
mov edx, dword [ebp - 0x164]
push edx
lea eax, [ebp - 0x104]
push eax
call fcn.00404a60
add esp, 0xc
mov dword [ebp - 0x168], eax
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0x16c], ecx
mov byte [ebp - 4], 1
push 0x62aa50
mov edx, dword [ebp - 0x16c]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.00404a60
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x104]
call fcn.0040bf30
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xe8]
call fcn.0040bf30
push str.actionp2p.log
lea ecx, [ebp - 0x2c]
call fcn.004024c0
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0040bf50
mov byte [ebp - 4], 5
push 0x62aa68
lea ecx, [ebp - 0x2c]
call fcn.0040be10
push eax
call fcn.005b1ae9
add esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x402485
lea edx, [ebp - 0x120]
push edx
call fcn.00500fe0
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.0040be10
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.005b1bc7
add esp, 0x14
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x120]
call fcn.0040bf30
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.005b1d61
add esp, 0x10
push 0x62aa84
lea ecx, [ebp - 0x13c]
call fcn.0040be30
mov byte [ebp - 4], 7
push 0x62aa88
lea ecx, [ebp - 0x158]
call fcn.0040be30
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.004fc450
add esp, 0xc
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x158]
call fcn.0040bf30
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x13c]
call fcn.0040bf30
lea ecx, [ebp - 0x4c]
call fcn.0040be10
push eax
push 0x62aa8c
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.005b1de3
add esp, 0xc
mov edx, dword [ebp - 0x30]
push edx
push 1
push 2
push 0x62aa90
call fcn.005b1d61
add esp, 0x10
mov eax, dword [ebp - 0x30]
push eax
call fcn.005b1fa4
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x4c]
call fcn.0040bf30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.0040bf30
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b1988
mov esp, ebp
pop ebp
ret 4