Function at 0x403830
Capabilities:
Initialize winsock library

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0xdf8
mov eax, dword [ecx]
mov dword [ebp - 0xddc], eax
mov esi, dword [ecx + 4]
call fcn.00456bb8
lea edi, [ebp - 0xc44]
mov ecx, 0x82c
mov al, 0
rep stosb byte es:[edi], al
lea eax, [ebp - 0xdd8]
mov dword [esp + 4], eax
mov dword [esp], 0x202
call sub.WS2_32.dll_WSAStartup
sub esp, 8
test eax, eax
je 0x4038ac
cmp dword [0x45e120], 0
je 0x403893
mov eax, str.Winsocket
jmp 0x403898
mov eax, str.Winsocket_initialization_failed_n
mov dword [esp], eax
call sub.msvcrt.dll_printf
mov dword [esp], 0xffffffff
call sub.msvcrt.dll_exit
mov dword [0x47e268], 0x1000
add dword [0x462148], 0x480
call fcn.004484b7
call fcn.0040251a
call fcn.00402565
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [0x47e388], eax
cmp byte [0x462144], 0
sete al
movzx eax, al
mov dword [0x462144], eax
call fcn.0040223c
call fcn.004019b4
call fcn.0043fddc
mov edx, dword [ebp - 0xddc]
lea eax, [edx*4 + 4]
mov dword [esp], eax
call fcn.004046e3
mov dword [ebp - 0xde0], eax
mov dword [ebp - 0xc48], 0
mov eax, 0
cmp dword [ebp - 0xddc], 0
jle 0x403964
mov eax, dword [esi + eax*4]
mov dword [esp], eax
call fcn.00439ef8
mov dword [esp], eax
call fcn.00439e66
mov edx, dword [ebp - 0xc48]
mov ecx, dword [ebp - 0xde0]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0xc48]
inc eax
mov dword [ebp - 0xc48], eax
cmp dword [ebp - 0xddc], eax
jg 0x40392d
mov edx, dword [ebp - 0xde0]
mov dword [edx + eax*4], 0
mov esi, dword [0x47ed08]
mov dword [esp], edx
call fcn.00402685
mov dword [esi + 8], eax
mov dword [esp], 0x47dfa0
call sub.msvcrt.dll__setjmp
mov dword [0x47c094], eax
test eax, eax
je 0x4039cd
mov eax, dword [0x47d6ec]
cmp eax, dword [0x47e10c]
je 0x4039c1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0041580d
jmp 0x403b47
mov dword [esp], 0xffffffff
call sub.msvcrt.dll_exit
call fcn.004023ea
mov dword [esp + 0xc], 0
mov eax, dword [0x47d6f8]
mov dword [esp + 8], eax
mov eax, dword [0x47df8c]
mov dword [esp + 4], eax
mov dword [esp], 0x47c0dc
call fcn.0043b195
cmp dword [ebp - 0xddc], 1
jle 0x403a26
mov dword [esp + 8], 2
mov dword [esp + 4], 0x46530d
mov ecx, dword [ebp - 0xde0]
mov eax, dword [ecx + 4]
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
je 0x403a36
mov edx, dword [ebp - 0xde0]
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00402405
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov dword [esp + 4], 0x47edc0
mov dword [esp], 0x4652c6
call fcn.00439fe7
test eax, eax
jne 0x403a75
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 4
call fcn.004037f7
mov dword [ebp - 0xc48], 1
cmp dword [ebp - 0xddc], 1
jle 0x403b47
mov eax, 1
mov ebx, 2
mov ecx, dword [ebp - 0xde0]
mov eax, dword [ecx + eax*4]
mov edi, 0x465310
mov esi, eax
mov ecx, ebx
repe cmpsb byte [esi], byte es:[edi]
seta cl
setb dl
cmp cl, dl
jne 0x403afc
lea eax, [ebp - 0xc48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xddc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xde0]
mov dword [esp], eax
call fcn.00402615
lea edx, [ebp - 0xc44]
mov dword [esp + 8], edx
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.00402e44
mov dword [esp], 0
call sub.msvcrt.dll_exit
mov dword [esp + 0x14], 0
mov edx, dword [0x47df8c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0043b7ad
mov eax, dword [ebp - 0xc48]
inc eax
mov dword [ebp - 0xc48], eax
cmp dword [ebp - 0xddc], eax
jg 0x403a96
mov eax, dword [0x47e388]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll__isatty
test eax, eax
je 0x403b67
mov dword [0x47c0cc], 1
jmp 0x403b85
cmp dword [0x47c0b8], 0
jne 0x403b85
mov dword [esp + 4], 0
mov eax, dword [0x47e388]
mov dword [esp], eax
call sub.msvcrt.dll_setbuf
mov dword [esp], 0x465313
call fcn.0040b184
mov dword [esp], 0x47dfa0
call sub.msvcrt.dll__setjmp
mov dword [0x47c094], eax
call fcn.004023ea
call fcn.00402a34
call fcn.0040223c
cmp dword [0x47c094], 0
je 0x403bfd
mov edx, dword [0x47d6ec]
mov ecx, dword [edx + 8]
mov eax, dword [ecx]
cmp eax, 0x101a
je 0x403bfd
cmp eax, 0x1000
je 0x403bfd
cmp eax, 0x405
jne 0x403be5
mov eax, dword [ecx + 8]
cmp dword [0x47e10c], eax
je 0x403bfd
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edx
call fcn.0041580d
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea esi, [ebp - 0x418]
mov eax, dword [0x47c074]
mov dword [esp], eax
call fcn.00413ff4
mov dword [0x47c05c], 0
cmp dword [0x47c0cc], 0
je 0x403c5b
mov dword [esp], 0
call fcn.00402960
mov edi, eax
lea eax, [ebp - 0xc44]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov dword [esp], edi
call fcn.00402e44
mov dword [esp], edi
call sub.msvcrt.dll_free
jmp 0x403c09
cmp dword [0x47e388], ebx
jne 0x403c6c
cmp dword [0x47c0c0], 0
je 0x403c81
call fcn.00402762
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00415e4a
mov edx, dword [0x47c0ac]
test edx, edx
je 0x403ce8
mov eax, dword [0x47e388]
test eax, eax
je 0x403d09
cmp dword [0x47c0c8], 0
je 0x403cf1
cmp dword [0x47c0b8], 0
je 0x403cf1
mov dword [esp + 0xc], 0
mov dword [esp + 4], edx
mov ecx, edx
sar ecx, 0x1f
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call fcn.004417c3
test eax, eax
jne 0x403ce8
mov eax, dword [0x47e388]
mov dword [esp], eax
call fcn.00442867
mov dword [esp], 1
call fcn.004026c7
jmp 0x403c09
mov eax, dword [0x47e388]
test eax, eax
je 0x403d09
mov dword [esp + 8], eax
mov dword [esp + 4], 0x3ff
mov dword [esp], esi
call fcn.0044295b
test eax, eax
jne 0x403d40
cmp dword [0x47c0c8], 0
jne 0x403d1e
mov dword [esp], 1
call sub.msvcrt.dll_exit
mov eax, dword [0x47e388]
test eax, eax
je 0x403d2f
mov dword [esp], eax
call fcn.00442867
mov dword [esp], 1
call fcn.004026c7
jmp 0x403c09
lea eax, [ebp - 0xc44]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov dword [esp], esi
call fcn.00402e44
jmp 0x403c09