Function at 0x412d70
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d318
mov eax, dword fs:[0]
push eax
mov eax, 0x2844
call fcn.00515b10
mov eax, dword [0x586dc4]
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, ecx
mov dword [ebp - 0x2824], esi
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x412dc4
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x282c], eax
lea ecx, [ebp - 0x282c]
push ecx
push 0x40b
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0041b376
lea ecx, [ebp - 0x2850]
call fcn.004235d8
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x2838], esp
push 0x53d594
mov byte [ebp - 4], 1
call fcn.00401650
mov eax, dword [ebp - 0x282c]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x2834], esp
mov esi, esp
push eax
mov byte [ebp - 4], 2
call fcn.00401350
add eax, 0x10
lea edx, [ebp - 0x2850]
add esp, 4
mov dword [esi], eax
push edx
mov byte [ebp - 4], 1
call fcn.00412650
add esp, 0x10
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x412e65
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x2820], eax
mov byte [ebp - 4], 3
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x412e95
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x2814], ebx
mov ecx, dword [ebp - 0x2848]
xor eax, eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x2828], eax
test ecx, ecx
jg 0x412f66
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412ee1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x2820]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412f07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x2850]
mov byte [ebp - 4], 0
call fcn.00423816
mov eax, dword [ebp - 0x282c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412f3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.00512fd6
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2828]
test eax, eax
js 0x4133ac
cmp eax, ecx
jge 0x4133ac
mov ecx, dword [ebp - 0x284c]
mov esi, dword [ecx + eax*4]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi - 4], 0
lea ecx, [esi - 4]
jl 0x412fa5
cmp eax, dword [esi - 0x10]
jne 0x412fa5
lea edi, [esi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x412fd6
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4133a7
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00512b2a
add esp, 0x10
add edi, 0x10
mov dword [ebp - 0x2818], edi
lea ecx, [ebp - 0x2818]
mov byte [ebp - 4], 5
call fcn.00404c90
mov ecx, eax
call fcn.00404740
mov ecx, dword [ebp - 0x2818]
cmp dword [ecx - 0xc], 0
jl 0x413022
push 0x53bec8
push ecx
call fcn.00513429
mov ecx, dword [ebp - 0x2818]
add esp, 8
test eax, eax
je 0x413022
sub eax, ecx
mov edi, eax
cmp edi, 0xffffffff
jne 0x413089
lea eax, [ecx - 0x10]
lea esi, [ebx - 0x10]
cmp eax, esi
je 0x41307f
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x41306f
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x41306f
push eax
call fcn.00401350
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x41305c
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x2814], ebx
mov ebx, 0x19
jmp 0x41316a
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x2814]
call fcn.004014c0
mov ebx, 0x19
jmp 0x41316a
push edi
lea ecx, [ebp - 0x283c]
push ecx
lea ecx, [ebp - 0x2818]
call fcn.00401d90
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [ebx - 0x10]
mov byte [ebp - 4], 6
cmp eax, esi
je 0x413101
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x4130f1
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4130f1
push eax
call fcn.00401350
mov dword [ebp - 0x281c], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4130e0
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x281c]
add ecx, 0x10
mov dword [ebp - 0x2814], ecx
jmp 0x413101
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x2814]
call fcn.004014c0
mov eax, dword [ebp - 0x283c]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413127
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc edi
push edi
lea ecx, [ebp - 0x2834]
push ecx
lea ecx, [ebp - 0x2818]
call fcn.00402170
mov eax, dword [eax]
push eax
call fcn.00513988
mov ebx, eax
mov eax, dword [ebp - 0x2834]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41316a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x2814]
push ebx
push ecx
lea edx, [ebp - 0x2820]
push str.connecting_to__s:_d...
push edx
call fcn.00401ff0
mov esi, dword [ebp - 0x2820]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esp, 0xc
mov dword [ebp - 0x281c], esp
mov dword [ebp - 0x281c], esp
call edx
cmp dword [esi - 4], 0
lea edx, [esi - 4]
jl 0x4131be
cmp eax, dword [esi - 0x10]
jne 0x4131be
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x4131ef
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4133a7
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00512b2a
add esp, 0x10
mov edx, dword [ebp - 0x281c]
mov ecx, dword [ebp - 0x2824]
add edi, 0x10
mov dword [edx], edi
call fcn.00412b50
push 0x14
push ecx
mov ecx, esp
mov dword [ebp - 0x281c], esp
push 0x53c108
call fcn.00401650
mov esi, dword [ebp - 0x2814]
push ebx
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
mov byte [ebp - 4], 7
mov dword [ebp - 0x2830], esp
mov ebx, esp
call edx
cmp dword [esi - 4], 0
lea edx, [esi - 4]
jl 0x413254
cmp eax, dword [esi - 0x10]
jne 0x413254
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x413285
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4133a7
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00512b2a
add esp, 0x10
add edi, 0x10
mov dword [ebx], edi
mov byte [ebp - 4], 5
call fcn.00410f20
add esp, 0x10
mov esi, eax
push ecx
mov ecx, esp
mov dword [ebp - 0x2830], esp
cmp esi, 0xffffffff
jne 0x4132b5
push str.connect_failed__r_n
call fcn.00401650
jmp 0x413349
push str.connect_successfully_
call fcn.00401650
mov ecx, dword [ebp - 0x2824]
call fcn.00412b50
push 4
lea edx, [ebp - 0x2838]
push edx
push 0x1006
push 0xffff
push esi
mov dword [ebp - 0x2838], 0x1388
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
push 0x2800
lea eax, [ebp - 0x2810]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x413354
lea ecx, [ebp - 0x2810]
push ecx
lea edx, [ebp - 0x2820]
push str.received:__s
push edx
mov byte [ebp + eax - 0x2810], 0
call fcn.00401ff0
mov eax, dword [ebp - 0x2820]
add esp, 8
add eax, 0xfffffff0
mov dword [ebp - 0x2830], esp
mov edi, esp
push eax
call fcn.00401350
add esp, 4
add eax, 0x10
mov dword [edi], eax
mov ecx, dword [ebp - 0x2824]
call fcn.00412b50
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x2818]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413381
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x2828]
mov ecx, dword [ebp - 0x2848]
mov ebx, dword [ebp - 0x2814]
inc eax
mov dword [ebp - 0x2828], eax
cmp eax, ecx
jl 0x412f60
jmp 0x412ec1
call fcn.00401170
call fcn.004143e1
int3