Function at 0x418650
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc5c
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
push 0x48ba08
push 0x48ba0c
call fcn.00473682
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x418c5b
mov eax, dword [ebp - 0x10]
push eax
push 0x100
lea ecx, [ebp - 0x110]
push ecx
call fcn.004737a5
add esp, 0xc
test eax, eax
je 0x418c4f
mov dword [ebp - 0x114], 1
mov edx, dword [ebp - 0x10]
push edx
push 0x100
lea eax, [ebp - 0x110]
push eax
call fcn.004737a5
add esp, 0xc
test eax, eax
je 0x418c4f
movsx ecx, byte [ebp - 0x110]
push ecx
call fcn.00477003
add esp, 4
test eax, eax
je 0x418c4f
cmp dword [ebp - 0x114], 0
jne 0x41876a
push 0xa
push 0
lea edx, [ebp - 0x110]
push edx
call fcn.00476f86
add esp, 0xc
mov esi, eax
mov edi, edx
push 0xa
push 0
mov eax, dword [0x90995c]
imul eax, eax, 0x208
add eax, 0x888c38
push eax
call fcn.00476cbd
add esp, 0xc
mov dword [ebp - 0xc54], esi
mov dword [ebp - 0xc50], edi
mov dword [ebp - 0xc5c], eax
mov dword [ebp - 0xc58], edx
mov ecx, dword [ebp - 0xc54]
cmp ecx, dword [ebp - 0xc5c]
jne 0x418c4f
mov edx, dword [ebp - 0xc50]
cmp edx, dword [ebp - 0xc58]
jne 0x418c4f
mov dword [ebp - 0x120], str.____
mov eax, dword [ebp - 0x120]
push eax
call fcn.00474a10
add esp, 4
mov dword [ebp - 0x118], eax
mov ecx, dword [ebp - 0x120]
push ecx
lea edx, [ebp - 0x110]
push edx
call fcn.0041e990
add esp, 8
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0
je 0x418c4a
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x11c]
add ecx, dword [ebp - 0x118]
push ecx
call fcn.00476990
add esp, 8
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
je 0x418c4a
mov edx, dword [ebp - 0x120]
push edx
mov eax, dword [ebp - 0x124]
add eax, dword [ebp - 0x118]
push eax
call fcn.00476990
add esp, 8
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0
je 0x418c4a
mov ecx, dword [ebp - 0x120]
push ecx
mov edx, dword [ebp - 0x128]
add edx, dword [ebp - 0x118]
push edx
call fcn.00476990
add esp, 8
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
je 0x418c4a
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x12c]
add ecx, dword [ebp - 0x118]
push ecx
call fcn.00476990
add esp, 8
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
je 0x418c4a
push 0x104
lea edx, [ebp - 0xbc8]
push edx
mov eax, dword [ebp - 0x11c]
lea ecx, [ebp - 0x110]
sub eax, ecx
push eax
lea edx, [ebp - 0x110]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [ebp + eax*2 - 0xbc8], cx
push 0x104
lea edx, [ebp - 0x548]
push edx
mov eax, dword [ebp - 0x11c]
add eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 0x124]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x11c]
add edx, dword [ebp - 0x118]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [ebp + eax*2 - 0x548], cx
push 0x104
lea edx, [ebp - 0x338]
push edx
mov eax, dword [ebp - 0x124]
add eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 0x128]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x124]
add edx, dword [ebp - 0x118]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [ebp + eax*2 - 0x338], cx
push 0x104
lea edx, [ebp - 0x9b8]
push edx
mov eax, dword [ebp - 0x128]
add eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 0x12c]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x128]
add edx, dword [ebp - 0x118]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [ebp + eax*2 - 0x9b8], cx
push 0x104
lea edx, [ebp - 0x7b0]
push edx
mov eax, dword [ebp - 0x12c]
add eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 0x130]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x12c]
add edx, dword [ebp - 0x118]
push edx
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov word [ebp + eax*2 - 0x7b0], cx
mov edx, dword [ebp - 0x130]
add edx, dword [ebp - 0x118]
push edx
call fcn.00476976
add esp, 4
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x9bc], 0x18
mov eax, dword [ebp - 0x9bc]
cmp eax, dword [ebp - 0x33c]
jge 0x418a07
push 0x10
push 0
push 0x48ba20
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0x7b0]
push ecx
call fcn.00419080
add esp, 4
mov dword [ebp - 0xbcc], eax
mov edx, dword [ebp - 0x33c]
push edx
lea eax, [ebp - 0x5a8]
push eax
mov ecx, dword [ebp - 0xbcc]
push ecx
call fcn.004190d0
add esp, 0xc
mov dword [ebp - 0xbd0], 0
jmp 0x418a54
mov edx, dword [ebp - 0xbd0]
add edx, 1
mov dword [ebp - 0xbd0], edx
mov eax, dword [ebp - 0xbd0]
cmp eax, dword [ebp - 0x33c]
jge 0x418b3b
lea ecx, [ebp - 0xbc8]
push ecx
push 0x3f2
mov edx, dword [0x8c8800]
push edx
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
lea eax, [ebp - 0x548]
push eax
push 0x3f3
mov ecx, dword [0x8c8800]
push ecx
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
lea edx, [ebp - 0x338]
push edx
push 0x3f4
mov eax, dword [0x8c8800]
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
lea ecx, [ebp - 0x9b8]
push ecx
push 0x3f5
mov edx, dword [0x8c8800]
push edx
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
push 0x48ba30
push 0x3f6
mov eax, dword [0x8c8800]
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
push 0
mov ecx, dword [ebp - 0xbd0]
mov edx, dword [ebp + ecx*4 - 0x5a8]
push edx
push 0x14e
push 0x3f7
mov eax, dword [0x8c8800]
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x3fb
mov ecx, dword [0x8c8800]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
push 0x3fb
push 0x111
mov edx, dword [0x8c8800]
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x418a45
mov eax, dword [ebp - 0x33c]
sub eax, 1
mov ecx, dword [0x90995c]
sub ecx, eax
mov dword [0x90995c], ecx
mov edx, dword [0x90995c]
push edx
push 0x3f1
mov eax, dword [0x8c8800]
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call fcn.00410fe0
add esp, 8
mov ecx, dword [0x90995c]
push ecx
mov edx, dword [0x8c8800]
push edx
call fcn.00410dc0
add esp, 8
mov dword [ebp - 0x114], 0
mov eax, dword [ebp - 0x10]
push eax
call fcn.00473f41
add esp, 4
mov dword [ebp - 4], eax
push 2
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00474030
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.00473f41
add esp, 4
sub eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
je 0x418c38
cmp dword [ebp - 8], 0
je 0x418bd8
mov eax, dword [ebp - 8]
push eax
call fcn.00473a78
add esp, 4
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00473ab2
add esp, 4
mov dword [ebp - 8], eax
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00474030
add esp, 0xc
mov dword [ebp - 0xbd4], 0
jmp 0x418c14
mov ecx, dword [ebp - 0xbd4]
add ecx, 1
mov dword [ebp - 0xbd4], ecx
mov edx, dword [ebp - 0xbd4]
cmp edx, dword [ebp - 0xc]
jge 0x418c38
mov eax, dword [ebp - 0x10]
push eax
call fcn.0047686c
add esp, 4
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xbd4]
mov byte [ecx], al
jmp 0x418c05
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00474030
add esp, 0xc
jmp 0x4186b9
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00473438
add esp, 4
cmp dword [ebp - 4], 0
je 0x418d23
push 0x48ba34
push 0x48ba38
call fcn.00473682
add esp, 8
mov dword [ebp - 0xbd8], eax
cmp dword [ebp - 0xbd8], 0
je 0x418d1e
mov edx, dword [0x8c87ec]
push edx
push 0x48ba44
mov eax, dword [ebp - 0xbd8]
push eax
call fcn.00473699
add esp, 0xc
mov dword [ebp - 0xbdc], 0
jmp 0x418cc0
mov ecx, dword [ebp - 0xbdc]
add ecx, 1
mov dword [ebp - 0xbdc], ecx
mov edx, dword [ebp - 0xbdc]
cmp edx, dword [ebp - 0xc]
jge 0x418cfd
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xbdc]
movzx ecx, byte [eax]
cmp ecx, 0xff
je 0x418cfd
mov edx, dword [ebp - 0xbd8]
push edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xbdc]
movzx ecx, byte [eax]
push ecx
call fcn.00474a9b
add esp, 8
jmp 0x418cb1
cmp dword [ebp - 8], 0
je 0x418d0f
mov edx, dword [ebp - 8]
push edx
call fcn.00473a78
add esp, 4
mov eax, dword [ebp - 0xbd8]
push eax
call fcn.00473438
add esp, 4
jmp 0x41906f
cmp dword [0x909a68], 0
je 0x41906f
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0xbe0], eax
cmp dword [ebp - 0xbe0], 0xffffffff
je 0x41906f
mov ecx, 2
mov word [ebp - 0xbf0], cx
push 0x141e
call sub.WS2_32.dll_htons
mov word [ebp - 0xbee], ax
mov edx, dword [0x909a68]
mov dword [ebp - 0xbec], edx
push 0x10
lea eax, [ebp - 0xbf0]
push eax
mov ecx, dword [ebp - 0xbe0]
push ecx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x419063
push 0
push 0
push 3
push 0
push 1
push connect
push 0x48ba48
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xbf4], eax
cmp dword [ebp - 0xbf4], 0xffffffff
je 0x419063
lea edx, [ebp - 0xc00]
push edx
push 0
push 0
mov eax, dword [ebp - 0xbf4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov dword [ebp - 0xbf8], eax
mov ecx, dword [ebp - 0xbf4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xbf8], 0
je 0x419063
mov dword [ebp - 0xc04], 8
cmp dword [ebp - 0xc04], 0
jle 0x418e63
push 0
mov edx, dword [ebp - 0xc04]
push edx
lea eax, [ebp - 0xbf8]
sub eax, dword [ebp - 0xc04]
push eax
mov ecx, dword [ebp - 0xbe0]
push ecx
call sub.WS2_32.dll_send
mov dword [ebp - 0xc08], eax
cmp dword [ebp - 0xc08], 0
jne 0x418e42
jmp 0x418e63
cmp dword [ebp - 0xc08], 0xffffffff
jne 0x418e4f
jmp 0x418e63
mov edx, dword [ebp - 0xc04]
sub edx, dword [ebp - 0xc08]
mov dword [ebp - 0xc04], edx
jmp 0x418e04
cmp dword [ebp - 0xc04], 0
jg 0x419063
mov dword [ebp - 0xc24], 0x18
cmp dword [ebp - 0xc24], 0
jle 0x418ed9
push 0
mov eax, dword [ebp - 0xc24]
push eax
lea ecx, [ebp - 0xc08]
sub ecx, dword [ebp - 0xc24]
push ecx
mov edx, dword [ebp - 0xbe0]
push edx
call sub.WS2_32.dll_recv
mov dword [ebp - 0xc28], eax
cmp dword [ebp - 0xc28], 0
jne 0x418eb8
jmp 0x418ed9
cmp dword [ebp - 0xc28], 0xffffffff
jne 0x418ec5
jmp 0x418ed9
mov eax, dword [ebp - 0xc24]
sub eax, dword [ebp - 0xc28]
mov dword [ebp - 0xc24], eax
jmp 0x418e7a
cmp dword [ebp - 0xc24], 0
jg 0x419063
push 0x48ba54
push 0x48ba58
call fcn.00473682
add esp, 8
mov dword [ebp - 0xc2c], eax
cmp dword [ebp - 0xc2c], 0
je 0x419063
mov ecx, dword [0x8c87ec]
push ecx
push 0x48ba64
mov edx, dword [ebp - 0xc2c]
push edx
call fcn.00473699
add esp, 0xc
push 0x48ba68
push 0x48ba6c
call fcn.00473682
add esp, 8
mov dword [ebp - 0xc30], eax
cmp dword [ebp - 0xc30], 0
je 0x419054
mov eax, dword [ebp - 0xc30]
push eax
push 0x100
lea ecx, [ebp - 0x110]
push ecx
call fcn.004737a5
add esp, 0xc
test eax, eax
je 0x419045
mov edx, dword [ebp - 0xc18]
mov dword [ebp - 0xc48], edx
mov eax, dword [ebp - 0xc14]
mov dword [ebp - 0xc44], eax
mov ecx, dword [ebp - 0xc10]
mov dword [ebp - 0xc40], ecx
mov edx, dword [ebp - 0xc0c]
mov dword [ebp - 0xc3c], edx
mov dword [ebp - 0xc38], 0
mov dword [ebp - 0xc34], 0
mov eax, dword [ebp - 0xc30]
push eax
push 0x100
lea ecx, [ebp - 0x110]
push ecx
call fcn.004737a5
add esp, 0xc
test eax, eax
je 0x419045
lea edx, [ebp - 0x110]
push edx
call fcn.00474a10
add esp, 4
mov dword [ebp - 0xc4c], eax
cmp dword [ebp - 0xc4c], 0
jle 0x419010
mov eax, dword [ebp - 0xc4c]
movsx ecx, byte [ebp + eax - 0x111]
cmp ecx, 0xa
jne 0x419010
mov edx, dword [ebp - 0xc4c]
mov byte [ebp + edx - 0x111], 0
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0xc48]
push ecx
mov edx, dword [ebp - 0xc1c]
push edx
mov eax, dword [ebp - 0xc20]
push eax
push str._I64d_____s_____s_n
mov ecx, dword [ebp - 0xc2c]
push ecx
call fcn.00473699
add esp, 0x18
jmp 0x418fb2
mov edx, dword [ebp - 0xc30]
push edx
call fcn.00473438
add esp, 4
mov eax, dword [ebp - 0xc2c]
push eax
call fcn.00473438
add esp, 4
mov ecx, dword [ebp - 0xbe0]
push ecx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
mov esp, ebp
pop ebp
ret