Function at 0x41df30
Capabilities:
Initialize winsock library

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x1ac
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
jne 0x41df52
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1ac
ret
mov bx, word [esp + 0x1c0]
cmp bx, bp
jne 0x41df6d
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1ac
ret
mov edi, dword [sym.imp.WS2_32.dll_socket]
push ebp
push 1
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x41dfe0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x276d
je 0x41df9e
pop edi
pop esi
pop ebp
mov eax, 0xffffd8ef
pop ebx
add esp, 0x1ac
ret
lea eax, [esp + 0x2c]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x41dfc2
pop edi
pop esi
pop ebp
mov eax, 0xffffd8ef
pop ebx
add esp, 0x1ac
ret
push ebp
push 1
push 2
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x41dfe0
pop edi
pop esi
pop ebp
mov eax, 0xffffd8ef
pop ebx
add esp, 0x1ac
ret
movsx edx, bx
mov ebx, dword [esp + 0x1c4]
mov word [esp + 0x1c], 2
cmp ebx, ebp
je 0x41e001
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
mov dword [esp + 0x24], ebp
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esp + 0x1c]
push 0x10
push ecx
push esi
mov word [esp + 0x2a], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x41e034
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x1ac
ret
push 0x50
call fcn.0042d143
mov dx, word [esp + 0x1c4]
mov ebp, eax
mov ecx, 0x14
xor eax, eax
mov edi, ebp
add esp, 4
rep stosd dword es:[edi], eax
mov word [ebp], dx
mov dword [esp + 0x14], ebp
test ebx, ebx
mov dword [ebp + 2], esi
lea edx, [ebp + 6]
mov edi, 0x464c60
je 0x41e06c
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x467950
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x1d0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1d4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1cc]
mov dword [ebp + 0x48], edx
mov dword [ebp + 0x44], ecx
mov dword [ebp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x467970]
mov esi, edx
cmp esi, edx
mov dword [esp + 0x18], esi
jl 0x41e1f7
mov eax, dword [0x46796c]
lea ebx, [esi + 1]
xor edi, edi
cmp ebx, edi
jne 0x41e0f8
cmp eax, edi
je 0x41e0e7
push eax
call fcn.0042d16c
add esp, 4
mov dword [0x46796c], edi
mov dword [0x467974], edi
mov dword [0x467970], edi
jmp 0x41e1f7
cmp eax, edi
jne 0x41e139
lea edi, [ebx*4]
push edi
call fcn.0042d143
mov edx, eax
mov ecx, edi
mov dword [0x46796c], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [0x467974], ebx
mov dword [0x467970], ebx
jmp 0x41e1f7
mov ecx, dword [0x467974]
cmp ebx, ecx
jg 0x41e15d
cmp ebx, edx
jle 0x41e152
mov ecx, ebx
lea edi, [eax + edx*4]
sub ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [0x467970], ebx
jmp 0x41e1f7
mov eax, dword [0x467978]
cmp eax, edi
jne 0x41e189
mov eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x41e17d
mov eax, 4
jmp 0x41e189
cmp eax, 0x400
jle 0x41e189
mov eax, 0x400
add eax, ecx
cmp ebx, eax
mov dword [esp + 0x10], eax
jl 0x41e197
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x10]
lea ecx, [eax*4]
push ecx
call fcn.0042d143
mov ecx, dword [0x467970]
mov esi, dword [0x46796c]
mov ebp, eax
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x467970]
mov ecx, ebx
sub ecx, eax
lea edi, [ebp + eax*4]
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [0x46796c]
push edx
call fcn.0042d16c
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov dword [0x46796c], ebp
mov ebp, dword [esp + 0x1c]
add esp, 8
mov dword [0x467970], ebx
mov dword [0x467974], eax
mov ecx, dword [0x46796c]
push 0x467950
mov dword [ecx + esi*4], ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0
push 0
push 0
push ebp
push 0x41e5a0
call fcn.004314ab
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1ac
ret