Function at 0x470170
Capabilities:
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d74e3
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x517b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ecx, 0x52da90
call fcn.00427ae0
mov eax, dword [ebp + 0xc]
add eax, esi
mov dword [ebp - 0x3c], eax
cmp esi, eax
jae 0x470390
mov ecx, dword [0x52ee74]
mov eax, dword fs:[0x2c]
mov edx, dword [0x52e024]
lea ebx, [eax + ecx*4]
mov dword [ebp - 0x34], ebx
movzx edi, word [esi + 0x28]
mov eax, dword [esi + 0x2c]
add edi, 0xd
cmp word [esi + 8], 1
lea edi, [eax + edi*4]
mov dword [ebp - 0x38], edi
jne 0x4701f5
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x30], 0
cmp edx, 1
je 0x470346
cmp edx, 2
je 0x470346
cmp edx, 4
je 0x470346
cmp edx, 3
jne 0x470384
mov ecx, dword [ebx]
mov eax, dword [0x52e030]
cmp eax, dword [ecx + 0xc]
jg 0x4703c1
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push 0x52db70
push esi
push dword [0x52e02c]
call fcn.0046fe80
movzx ecx, word [esi + 0x28]
add esp, 0x10
mov eax, dword [esi + 0x2c]
push 0
lea eax, [eax + ecx*4]
add eax, 0x34
push eax
push esi
push dword [0x517484]
call dword [sym.imp.WS2_32.dll_send]
movzx edx, word [esi + 0x28]
mov ecx, dword [esi + 0x2c]
lea ecx, [ecx + edx*4]
add ecx, 0x34
cmp eax, ecx
jne 0x4703ac
mov ebx, dword [ebp - 0x30]
test ebx, ebx
je 0x47033b
mov ecx, dword [0x52e02c]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ecx + 0x524]
push eax
lea eax, [ecx + 0x4b8]
mov ecx, ebx
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00481fd0
mov eax, dword [ebp - 0x18]
push eax
mov dword [ebp - 0x2c], eax
call fcn.004a7559
mov edi, dword [0x52e02c]
add esp, 4
mov edx, dword [ebp - 0x2c]
mov ecx, ebx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x30], eax
lea edx, [edi + 0x524]
mov dword [ebp - 0x28], eax
push edx
lea edx, [edi + 0x4b8]
mov dword [ebp - 0x24], 0
push edx
lea eax, [ebp - 0x28]
push eax
call fcn.00481fd0
push 0
push 4
lea eax, [ebp - 0x2c]
push eax
push dword [0x517484]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp - 0x30]
push 0
push dword [ebp - 0x2c]
push edi
push dword [0x517484]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, dword [ebp - 0x24]
jne 0x4703ac
push edi
call fcn.004a71f6
add esp, 4
mov edx, dword [0x52e024]
mov ebx, dword [ebp - 0x34]
jmp 0x470384
push esi
mov ecx, 0x52da90
call fcn.004273d0
mov edx, dword [0x52e024]
cmp edx, 2
jne 0x470384
cmp word [esi + 8], 1
jne 0x470384
movzx eax, word [esi + 0xc]
test ax, ax
je 0x470371
cmp eax, 1
jne 0x470384
movzx ecx, word [esi + 0x28]
mov eax, dword [esi + 0x2c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + esi + 0x34]
add esi, 4
add esi, eax
add esi, dword [ebp - 0x38]
cmp esi, dword [ebp - 0x3c]
jb 0x4701d0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a71aa
mov esp, ebp
pop ebp
ret
push 0x4f40f8
call fcn.00405a40
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x52e030
call fcn.004a74f5
add esp, 4
cmp dword [0x52e030], 0xffffffff
jne 0x470233
push 0x590
mov dword [ebp - 4], 0
call fcn.004a71b8
mov edi, eax
add esp, 4
mov dword [ebp - 0x40], edi
mov byte [ebp - 4], 1
test edi, edi
je 0x470415
push 0x590
push 0
push edi
call fcn.004aa220
add esp, 0xc
mov ecx, edi
call fcn.004266c0
jmp 0x470419
xor eax, eax
jmp 0x470419
push 0x52e030
mov dword [0x52e02c], eax
mov dword [ebp - 4], 0xffffffff
call fcn.004a74a4
add esp, 4
jmp 0x470233