Function at 0x4f6b50
Capabilities:
Connect socket
Get hostname
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x224
mov al, byte [0x4e8ca0]
mov byte [esp + 0x58], al
push ebx
push esi
xor eax, eax
push edi
mov ecx, 0x18
lea edi, [esp + 0x65]
push ebp
mov ebp, 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [esp + 0x240], eax
jne 0x4f6b91
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, dword [esp + 0x240]
mov byte [eax], 0
call fcn.004f8590
cmp eax, 1
jne 0x4f6ba7
xor ebp, ebp
lea edi, [esp + 0xcc]
xor eax, eax
mov ecx, 0x19
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x23c]
mov ecx, 0xffffffff
sub eax, eax
lea edi, [ebx + 2]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0xcc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x4e920c
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xd0]
mov esi, dword [sym.imp.MSVCRT.dll__stricmp]
push ecx
call esi
add esp, 8
test eax, eax
jne 0x4f6c29
cmp ebp, 1
jne 0x4f6c29
mov eax, dword [esp + 0x240]
mov esi, dword [esp + 0x238]
push eax
push esi
call fcn.004fad90
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea eax, [esp + 0xcc]
push 0x4e920c
push eax
call esi
add esp, 8
test eax, eax
jne 0x4f6c77
test ebp, ebp
jne 0x4f6c77
lea eax, [esp + 0x68]
push 0x64
push eax
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
jne 0x4f6c9f
mov eax, dword [0x4e9330]
mov ebp, dword [0x4e9334]
mov ecx, 0x4e9330
lea edx, [esp + 0x68]
mov cx, word [ecx + 8]
mov dword [edx], eax
mov dword [edx + 4], ebp
mov word [edx + 8], cx
jmp 0x4f6c9f
lea edi, [esp + 0xcc]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004f8c50
xor ecx, ecx
mov cx, word [ebx + 0x74]
dec ecx
cmp ecx, 7
ja case.0x4f6cb8.5
xor edx, edx
mov dl, byte [ecx + 0x4f73a0]
jmp dword [edx*4 + 0x4f738c]
test al, 1
je 0x4f6ccd
mov dword [esp + 0x10], 1
jmp 0x4f6d47
test al, 2
jne 0x4f6d3f
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
test al, 1
je 0x4f6cef
mov dword [esp + 0x10], 1
jmp 0x4f6d47
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
test al, 2
jne 0x4f6d3f
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, dword [esp + 0x240]
mov esi, dword [esp + 0x238]
push eax
push ebx
push esi
call fcn.004f7460
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
test al, 2
je 0x4f737c
mov dword [esp + 0x10], 2
lea eax, [esp + 0x68]
push eax
call fcn.004f8cb0
add esp, 4
test eax, eax
jne 0x4f6d67
test byte [esp + 0x10], 2
je 0x4f6d67
mov dword [esp + 0x10], 2
push ebx
call fcn.004f5d30
add esp, 4
cmp eax, 0xffffffff
jne 0x4f6db4
cmp dword [esp + 0x10], 2
jne 0x4f6d87
push 0x3e8
push 2
push 6
jmp 0x4f6d8d
push 0x11
push 2
push 2
call fcn.004f5a80
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4f6daa
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
push eax
push ebx
call fcn.004f5d50
add esp, 8
lea eax, [esp + 0x38]
push 0
lea ecx, [esp + 0x6c]
push eax
cmp dword [esp + 0x18], 2
push ecx
jne 0x4f6de3
call fcn.004f8dd0
add esp, 0xc
test eax, eax
je 0x4f6dff
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
call fcn.004f89c0
add esp, 0xc
test eax, eax
je 0x4f6dff
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
cmp dword [0x4e9488], 0
je 0x4f6e20
call fcn.004f73b0
push eax
call fcn.004f2060
mov dword [0x4e9488], 0
add esp, 4
call sub.MSVCRT.dll__getpid
mov dword [0x4eb7ec], eax
call fcn.004f73b0
cmp dword [eax], 0
je 0x4f6e98
mov esi, dword [sym.imp.KERNEL32.dll_GetVersion]
call esi
cmp eax, 0x80000000
jb 0x4f6e98
call esi
cmp eax, 0x80000000
jb 0x4f6e52
call esi
cmp al, 4
jb 0x4f6e98
cmp dword [esp + 0x10], 2
jne 0x4f6e98
push ebx
call fcn.004f5d30
add esp, 4
push eax
call sub.WSOCK32.dll_closesocket
push 0x3e8
push 2
push 6
call fcn.004f5a80
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4f6e8e
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
push eax
push ebx
call fcn.004f5d50
add esp, 8
lea eax, [esp + 0x38]
push eax
call fcn.004f73b0
mov eax, dword [eax]
push eax
call fcn.004f73c0
add esp, 8
mov ebp, eax
test ebp, ebp
jne 0x4f6fae
push 0x58
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov ebp, eax
test ebp, ebp
jne 0x4f6ed8
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
cmp dword [esp + 0x10], 2
jne 0x4f6f28
lea esi, [ebp + 8]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov word [esi], 6
call fcn.004f5d90
push eax
call fcn.004f5bb0
mov word [esi + 0xc], ax
add esp, 4
lea eax, [esp + 0x38]
push esi
push eax
call fcn.004f8d50
add esp, 8
test eax, eax
jne 0x4f6f74
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea eax, [ebp + 8]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov word [eax], 2
call fcn.004f5d90
push eax
call fcn.004f5bb0
mov word [ebp + 0xa], ax
lea ecx, [esp + 0x3c]
add esp, 4
push ecx
call fcn.004f5a20
add esp, 4
mov dword [ebp + 0xc], eax
cmp eax, 0xffffffff
jne 0x4f6f74
mov eax, 0x3d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea edi, [esp + 0x38]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [ebp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp], 1
call fcn.004f73b0
push eax
call fcn.004f2070
add esp, 8
mov dword [0x4eb7e0], 0x189d
mov eax, dword [ebp]
mov esi, dword [esp + 0x238]
and eax, 0x1fff
mov edi, esi
mov ecx, 0xffffffff
mov dword [0x4eb7e4], eax
mov dword [0x4eb7e8], 0
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
mov edx, ecx
mov edi, 0x4eb7f0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4eb630
xor eax, eax
mov ecx, 0x68
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov edi, 0x4eb488
push eax
call fcn.004f6b30
xor eax, eax
mov ecx, 0x68
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], 1
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, dword [0x4eb7e0]
push ecx
call fcn.004f5be0
add esp, 4
mov ecx, dword [0x4eb7e4]
mov dword [0x4eb488], eax
push ecx
call fcn.004f5be0
add esp, 4
mov ecx, dword [0x4eb7e8]
mov dword [0x4eb48c], eax
push ecx
call fcn.004f5be0
add esp, 4
mov ecx, dword [0x4eb7ec]
mov edi, 0x4eb7f0
mov dword [0x4eb490], eax
push ecx
call fcn.004f5be0
add esp, 4
mov ecx, 0xffffffff
mov dword [0x4eb494], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, 0x4eb498
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x2c]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x38]
cmp dword [esp + 0x18], eax
jae 0x4f730c
cmp dword [esp + 0x10], 2
jne 0x4f7116
push 0x10
lea eax, [ebp + 8]
push eax
push ebx
call fcn.004f5d30
add esp, 4
push eax
call sub.WSOCK32.dll_connect
cmp dword [esp + 0x14], 0
je 0x4f714c
push 0
push 0x1a0
push 0x4eb488
push ebx
call fcn.004f5d30
add esp, 4
push eax
call sub.WSOCK32.dll_send
cmp eax, 0x1a0
je 0x4f714c
call sub.WSOCK32.dll_WSAGetLastError
mov eax, 0x3e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
cmp dword [esp + 0x14], 0
je 0x4f714c
push 0x10
lea eax, [ebp + 8]
push eax
push 0
push 0x1a0
push 0x4eb488
push ebx
call fcn.004f5d30
add esp, 4
push eax
call fcn.004f5b30
add esp, 0x18
cmp eax, 0x1a0
jne 0x4f7323
mov dword [esp + 0x14], 0
mov dword [esp + 0x130], 0
push ebx
call fcn.004f5d30
mov dword [esp + 0x138], eax
add esp, 4
mov eax, dword [esp + 0x18]
inc dword [esp + 0x130]
mov dword [esp + 0x28], 0
mov ecx, dword [eax]
lea eax, [esp + 0x130]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push eax
push ebx
call fcn.004f5d30
add esp, 4
inc eax
push eax
call fcn.004f5ab0
add esp, 0x14
cmp eax, 0xffffffff
je 0x4f72dd
test eax, eax
je 0x4f72f4
mov edi, 0x4eb488
xor eax, eax
mov dword [esp + 0x20], 0x10
mov ecx, 0x68
rep stosd dword es:[edi], eax
cmp dword [esp + 0x10], 2
jne 0x4f720b
push eax
push 0x1a0
push 0x4eb488
push ebx
call fcn.004f5d30
add esp, 4
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0x1a0
je 0x4f723c
mov eax, 0x6c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
lea eax, [esp + 0x20]
lea ecx, [esp + 0x58]
push eax
push ecx
push 0
push 0x1a0
push 0x4eb488
push ebx
call fcn.004f5d30
add esp, 4
push eax
call fcn.004f5b70
add esp, 0x18
cmp eax, 0xffffffff
je 0x4f7333
mov eax, dword [0x4eb488]
mov edi, 0x4eb498
push eax
call fcn.004f5be0
add esp, 4
mov dword [0x4eb630], eax
mov eax, dword [0x4eb48c]
push eax
call fcn.004f5be0
add esp, 4
mov dword [0x4eb634], eax
mov eax, dword [0x4eb490]
push eax
call fcn.004f5be0
add esp, 4
mov dword [0x4eb638], eax
mov eax, dword [0x4eb494]
push eax
call fcn.004f5be0
add esp, 4
mov ecx, 0xffffffff
mov dword [0x4eb63c], eax
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, 0x4eb640
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x10], 1
jne 0x4f72c6
lea esi, [ebp + 0xc]
lea edi, [esp + 0x5c]
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
jne 0x4f7301
mov eax, dword [0x4eb7e4]
cmp dword [0x4eb634], eax
jne 0x4f7301
mov dword [esp + 0x1c], 1
jmp 0x4f7301
cmp eax, 0x2714
je 0x4f7301
mov eax, 0x6d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov dword [esp + 0x14], 1
add dword [esp + 0x18], 4
cmp dword [esp + 0x1c], 0
je 0x4f70ae
cmp dword [esp + 0x1c], 1
je 0x4f7343
mov eax, 0x3c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, 0x3e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, 0x6c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov edi, 0x4eb640
mov ecx, 0xffffffff
inc dword [ebp]
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [esp + 0x240]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
pop ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x224
ret
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x224
ret