Function at 0x41ddba
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1680
call fcn.0043b0f0
push ebx
push edi
lea edi, [esi + 0x4c]
push edi
mov eax, esi
call fcn.0041e5b1
test eax, eax
jne 0x41ddf0
push edi
push esi
call fcn.0041e5d9
test eax, eax
je 0x41ddf0
mov eax, 0x190
jmp 0x41e243
push 0xfff
lea eax, [esp + 0x28d]
push 0
push eax
mov byte [esp + 0x294], 0
call fcn.0043ab70
add esp, 0xc
push dword [esi]
mov ebx, str.TYPE_A_r_n
call fcn.0041dc34
pop ecx
push dword [esi]
lea edi, [esp + 0x28c]
call fcn.0041dcea
pop ecx
cmp eax, 0xc8
je 0x41de3c
mov eax, 0x191
jmp 0x41e243
push dword [esi]
mov ebx, str.PASV_r_n
call fcn.0041dc34
pop ecx
push dword [esi]
lea edi, [esp + 0x28c]
call fcn.0041dcea
pop ecx
cmp eax, 0xe3
je 0x41de69
mov eax, 0x192
jmp 0x41e243
xor ebx, ebx
push 0xff
lea eax, [esp + 0x18d]
push ebx
push eax
mov byte [esp + 0x194], bl
call fcn.0043ab70
xor eax, eax
mov byte [esp + 0x34], bl
lea edi, [esp + 0x35]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x44], bl
lea edi, [esp + 0x45]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0xc
xor edx, edx
stosb byte es:[edi], al
cmp byte [esp + 0x288], bl
je 0x41df3a
lea ecx, [esp + 0x38]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x188]
lea eax, [esp + 0x288]
mov dword [esp + 0xc], ecx
movsx ecx, byte [eax]
sub ecx, 0x28
je 0x41df32
dec ecx
je 0x41df2e
sub ecx, 3
jne 0x41def2
inc edx
cmp edx, 5
mov byte [eax], 0x2e
jge 0x41df35
lea ecx, [edx - 1]
cmp ecx, 3
ja 0x41df08
mov edi, dword [esp + 0xc]
mov cl, byte [eax]
inc dword [esp + 0xc]
mov byte [edi], cl
jmp 0x41df35
cmp edx, 5
jne 0x41df1b
mov edi, dword [esp + 0x14]
mov cl, byte [eax]
inc dword [esp + 0x14]
mov byte [edi], cl
jmp 0x41df35
cmp edx, 6
jne 0x41df35
mov edi, dword [esp + 0x10]
mov cl, byte [eax]
inc dword [esp + 0x10]
mov byte [edi], cl
jmp 0x41df35
xor edx, edx
jmp 0x41df35
xor edx, edx
inc edx
inc eax
cmp byte [eax], bl
jne 0x41ded9
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x41df58
mov eax, 0x193
jmp 0x41e243
push 2
pop eax
mov word [esp + 0x18], ax
lea eax, [esp + 0x188]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x28]
push eax
call fcn.0043bd5b
mov edi, eax
pop ecx
lea eax, [esp + 0x38]
push eax
shl edi, 8
call fcn.0043bd5b
pop ecx
add eax, edi
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
push 0x10
lea eax, [esp + 0x1c]
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41dfba
mov eax, 0x194
jmp 0x41e243
push dword [esi + 0x3c]
lea eax, [esp + 0x28c]
push str.LIST__s_r_n
push eax
call fcn.0043bf32
add esp, 0xc
push dword [esi]
lea ebx, [esp + 0x28c]
call fcn.0041dc34
pop ecx
push dword [esi]
mov edi, ebx
call fcn.0041dcea
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 1
je 0x41e000
mov eax, 0x195
jmp 0x41e243
push 0x3ff
xor edi, edi
lea eax, [esp + 0x128d]
push edi
push eax
mov byte [esp + 0x1294], 0
call fcn.0043ab70
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
add esp, 0xc
mov dword [esp + 0xc], edi
mov eax, dword [esi]
xor edx, edx
mov dword [esp + 0x84], eax
mov eax, dword [esi + 4]
inc edx
mov dword [esp + 0x80], edx
cmp eax, 0xffffffff
je 0x41e06b
xor ecx, ecx
cmp dword [esp + ecx*4 + 0x84], eax
je 0x41e055
inc ecx
cmp ecx, edx
jb 0x41e047
cmp ecx, edx
jne 0x41e06b
mov dword [esp + 0x88], eax
mov dword [esp + 0x80], 2
push edi
push edi
push edi
lea eax, [esp + 0x8c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x41e0fd
lea eax, [esp + 0x80]
push eax
push dword [esi + 4]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41e0c6
mov eax, dword [esp + 0xc]
push edi
mov ecx, 0x400
sub ecx, eax
push ecx
lea eax, [esp + eax + 0x1290]
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, edi
jg 0x41e0c2
push dword [esi + 4]
call ebx
or dword [esi + 4], 0xffffffff
jmp 0x41e0c6
add dword [esp + 0xc], eax
lea eax, [esp + 0x80]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41e02a
push dword [esi]
lea edi, [esp + 0x28c]
call fcn.0041dcea
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
xor edi, edi
cmp eax, 1
je 0x41e02a
push dword [esi + 4]
call ebx
or dword [esi + 4], 0xffffffff
cmp dword [esp + 0xc], edi
jle 0x41e12f
push dword [esp + 0xc]
lea eax, [esp + 0x128c]
lea ebx, [esp + 0x4c]
call fcn.0041ebf6
pop ecx
test eax, eax
je 0x41e12f
mov eax, dword [esp + 0x5c]
cdq
jmp 0x41e1ee
push dword [esi]
mov ebx, str.TYPE_I_r_n
call fcn.0041dc34
pop ecx
push dword [esi]
lea edi, [esp + 0x28c]
call fcn.0041dcea
pop ecx
cmp eax, 0xc8
je 0x41e15c
mov eax, 0x198
jmp 0x41e243
push dword [esi + 0x3c]
lea eax, [esp + 0x28c]
push str.SIZE__s_r_n
push eax
call fcn.0043bf32
add esp, 0xc
push dword [esi]
lea ebx, [esp + 0x28c]
call fcn.0041dc34
pop ecx
push dword [esi]
mov edi, ebx
call fcn.0041dcea
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 2
je 0x41e1a2
mov eax, 0x197
jmp 0x41e243
lea eax, [esp + 0x288]
xor edi, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41e1ae
sub eax, edx
je 0x41e1e0
lea eax, [esp + edi + 0x288]
cmp byte [eax], 0x20
je 0x41e1e0
mov byte [eax], 0x20
lea eax, [esp + 0x288]
inc edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x41e1d3
sub eax, ecx
cmp edi, eax
jb 0x41e1b9
lea eax, [esp + 0x288]
push eax
call fcn.0043bd66
pop ecx
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], edx
mov dword [ecx], eax
push dword [esi]
mov ebx, str.REST_100_r_n
call fcn.0041dc34
pop ecx
push dword [esi]
lea edi, [esp + 0x28c]
call fcn.0041dcea
pop ecx
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 3
je 0x41e222
lea eax, [ecx + 0x64]
jmp 0x41e243
push dword [esi]
mov ebx, str.REST_0_r_n
call fcn.0041dc34
pop ecx
push dword [esi]
lea edi, [esp + 0x28c]
call fcn.0041dcea
pop ecx
mov eax, 0xce
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4