Function at 0x437c80
Capabilities:
Create tcp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0x45]
xor ebx, ebx
cmp eax, 0xffffffff
push edi
je 0x437c9f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x49], ebx
push 6
mov ebp, 1
push ebp
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x45], eax
je 0x437e86
mov ecx, dword [0x4b03a4]
mov eax, ecx
mov word [esp + 0x18], 2
cmp byte [eax], bl
je 0x437cd6
mov edi, edi
add eax, ebp
cmp byte [eax], bl
jne 0x437cd0
sub eax, ecx
test eax, eax
jle 0x437cf1
movzx eax, word [0x4b03a8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
jmp 0x437cf6
mov word [esp + 0x1a], bx
mov edx, dword [esi + 0x45]
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push edx
mov dword [esp + 0x28], ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x437e5e
mov eax, dword [esi + 0x45]
push bind
push eax
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x437e50
mov edx, dword [esi + 0x45]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [esp + 0x40]
push ecx
push 8
push 0xffff
push edx
mov dword [esp + 0x50], ebp
call edi
mov ecx, dword [esi + 0x45]
push 4
lea eax, [esp + 0x40]
push eax
push ebp
push 0xffff
push ecx
mov dword [esp + 0x50], ebp
call edi
mov ecx, dword [0x4b03a4]
mov eax, ecx
cmp byte [eax], bl
je 0x437d76
lea ecx, [ecx]
add eax, ebp
cmp byte [eax], bl
jne 0x437d70
sub eax, ecx
test eax, eax
jle 0x437dca
lea edx, [esp + 0x10]
push edx
push ecx
call fcn.0044a850
mov eax, dword [0x4b03a8]
movzx edx, byte [esp + 0x1b]
mov ecx, eax
and ecx, 0xff
push ecx
sar eax, 8
push eax
movzx eax, byte [esp + 0x22]
push edx
push eax
mov eax, dword [esp + 0x28]
movzx ecx, ah
movzx edx, al
push ecx
push edx
push str.227_Entering_Passive_Mode___d__d__d__d__d__d_._r_n
push esi
call fcn.00436e90
add esp, 0x28
pop edi
mov dword [esi + 0x49], ebp
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov edx, dword [esi + 0x45]
mov ebx, dword [sym.imp.WS2_32.dll_getsockname]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x1c], 0x10
call ebx
test eax, eax
jne 0x437e42
mov edx, dword [esi + 8]
movzx edi, word [esp + 0x2a]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x1c], 0x10
call ebx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.0044a8f0
movzx eax, byte [esp + 0x1f]
movzx ecx, byte [esp + 0x1e]
mov edx, edi
sar edx, 8
push edx
and edi, 0xff
push edi
push eax
mov eax, dword [esp + 0x28]
movzx edx, ah
push ecx
movzx eax, al
push edx
push eax
jmp 0x437db1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.getsockname___failed_to_get_socket_ip_and_port__d_n
jmp 0x437e6a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.listen___failed_to_listen.__d_n
jmp 0x437e6a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind___failed_to_bind_listen_socket__d_n
push ebp
call fcn.00437ae0
mov ecx, dword [esi + 0x45]
add esp, 0xc
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x45], 0xffffffff
jmp 0x437e94
push str.socket___failed_to_create_pasv_listen_socket._n
push ebp
call fcn.00437ae0
add esp, 8
push str.500_Failed_to_Enter_Passive_Mode._r_n
push esi
call fcn.00436e90
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret