Function at 0x405731
Capabilities:
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 4], 0
push 0x10
call fcn.0042a2aa
add esp, 4
mov dword [ebp - 8], eax
mov ebx, eax
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
add ebx, 0xc
push ebx
push 0x10
call fcn.0042a2aa
add esp, 4
pop ebx
mov dword [ebx], eax
mov edi, eax
mov esi, 0x473f50
lodsd eax, dword [esi]
stosd dword es:[edi], eax
lodsd eax, dword [esi]
stosd dword es:[edi], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
cmp dword [ebp + 0xc], 0
jne 0x4057b9
mov eax, str.0.0.0.0
push eax
mov ebx, dword [ebp + 8]
mov ebx, dword [ebx]
test ebx, ebx
je 0x4057b3
push ebx
call fcn.0042a2b0
add esp, 4
pop eax
mov ebx, dword [ebp + 8]
mov dword [ebx], eax
mov dword [ebp - 0xc], esp
push 6
push 1
push 2
xor eax, eax
call dword [sym.imp.WS2_32.dll_socket]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x4057f1
push 0x82
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40580c
cmp dword [ebp - 4], 0xffffffff
je 0x40580c
xor eax, eax
jmp 0x405811
mov eax, 1
test eax, eax
je 0x405823
mov eax, 0
jmp 0x405c1a
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
mov word [ebx], 2
mov ebx, dword [ebp - 8]
add ebx, 4
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], esp
push dword [ebp + 0x10]
xor eax, eax
call dword [sym.imp.WS2_32.dll_htons]
nop
nop
cmp dword [ebp - 0x10], esp
je 0x405866
push 0x171
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov ebx, dword [ebp - 0xc]
mov word [ebx], ax
mov ebx, dword [ebp - 8]
add ebx, 8
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], esp
mov ebx, dword [ebp + 8]
push dword [ebx]
xor eax, eax
call dword [sym.imp.WS2_32.dll_inet_addr]
nop
nop
cmp dword [ebp - 0x10], esp
je 0x4058a3
push 0x1ae
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov ebx, dword [ebp - 0xc]
mov dword [ebx], eax
mov ebx, dword [ebp - 8]
add ebx, 8
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0xc]
cmp dword [ebx], 0xffffffff
jne 0x4058f3
mov dword [ebp - 0xc], esp
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_closesocket]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x4058e9
push 0x204
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov eax, 0
jmp 0x405c1a
mov dword [ebp - 0xc], esp
mov eax, dword [ebp - 8]
push eax
push 0x10
call fcn.0042a2aa
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
mov ebx, dword [ebx]
add ebx, 8
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop ebx
add ebx, 4
xor eax, eax
call dword [0x496687]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x40596d
push 0x280
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
push eax
mov ebx, dword [ebp - 0x10]
push ebx
mov edi, dword [ebp - 0x14]
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
push edi
push 1
mov eax, 2
call fcn.0042b060
add esp, 4
pop edi
pop ebx
push ebx
push edi
mov edi, dword [edi]
mov ecx, dword [edi]
add edi, 4
test ecx, ecx
je 0x4059c4
mov eax, dword [edi]
add edi, 4
dec ecx
je 0x4059c2
imul eax, dword [edi]
jmp 0x4059b7
mov ecx, eax
cmp ecx, 8
jle 0x4059ce
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
add edi, 4
add ebx, 8
call fcn.0042a2b0
add esp, 4
pop eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esp
push dword [ebp - 0x18]
mov eax, dword [ebp - 8]
push eax
push 0x10
call fcn.0042a2aa
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
mov ebx, dword [ebx]
add ebx, 8
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop ebx
add ebx, 4
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_bind]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x405a66
push 0x280
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
push eax
mov ebx, dword [ebp - 0x20]
push ebx
mov edi, dword [ebp - 0x24]
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
push edi
push 1
mov eax, 2
call fcn.0042b060
add esp, 4
pop edi
pop ebx
push ebx
push edi
mov edi, dword [edi]
mov ecx, dword [edi]
add edi, 4
test ecx, ecx
je 0x405abd
mov eax, dword [edi]
add edi, 4
dec ecx
je 0x405abb
imul eax, dword [edi]
jmp 0x405ab0
mov ecx, eax
cmp ecx, 8
jle 0x405ac7
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
add edi, 4
add ebx, 8
call fcn.0042a2b0
add esp, 4
pop eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x405b1f
mov dword [ebp - 0xc], esp
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_closesocket]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x405b15
push 0x2a2
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov eax, 0
jmp 0x405c1a
mov dword [ebp - 0xc], esp
push 5
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_listen]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x405b50
push 0x2fe
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x405b93
mov dword [ebp - 0xc], esp
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_closesocket]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x405b89
push 0x324
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov eax, 0
jmp 0x405c1a
mov dword [ebp - 0xc], esp
push 0x29
push 0x17258
push dword [0x4965eb]
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x405bcf
push 0x3a5
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x405c12
mov dword [ebp - 0xc], esp
push dword [ebp - 4]
xor eax, eax
call dword [sym.imp.WS2_32.dll_closesocket]
nop
nop
cmp dword [ebp - 0xc], esp
je 0x405c08
push 0x3cf
push 0x401b952
push 6
call fcn.0042a2b6
add esp, 0xc
mov eax, 0
jmp 0x405c1a
mov eax, dword [ebp - 4]
jmp 0x405c1a
push eax
mov ebx, dword [ebp - 8]
push ebx
add ebx, 0xc
push ebx
mov ebx, dword [ebx]
push ebx
call fcn.0042a2b0
add esp, 4
pop ebx
call fcn.0042a2b0
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0xc