Function at 0x416588
Capabilities:
Initialize winsock library
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1bc
push ebx
push esi
mov esi, dword [ebp + 8]
and esi, 1
push edi
mov dword [esp + 0x14], esi
jne 0x4165ad
xor ebx, ebx
mov dword [0x424730], ebx
jmp 0x4165af
xor ebx, ebx
call fcn.0041618a
mov edi, eax
mov dword [0x424748], edi
cmp edi, ebx
je 0x416743
cmp esi, ebx
jne 0x4165e1
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x424744], eax
cmp eax, ebx
je 0x416743
jmp 0x41668e
push 0x4046d4
call fcn.004160c4
push 0x4046e4
mov dword [esp + 0x1c], eax
call fcn.004160c4
mov dword [esp + 0x1c], eax
mov eax, dword [0x424744]
mov ecx, dword [eax + 0x3c]
mov dword [esp + 0x10], eax
lea ecx, [ecx + eax + 0x80]
cmp dword [esp + 0x1c], ebx
je 0x41668e
cmp dword [esp + 0x18], ebx
je 0x41668e
mov edi, dword [ecx]
cmp edi, ebx
jbe 0x41668e
cmp dword [ecx + 4], 0x14
jbe 0x41668e
add edi, eax
cmp dword [edi], ebx
je 0x41668e
mov eax, dword [edi + 0xc]
add eax, dword [esp + 0x10]
push eax
call dword [esp + 0x20]
mov dword [esp + 0x20], eax
cmp eax, ebx
je 0x416743
mov esi, dword [edi]
mov ebx, dword [edi + 0x10]
add esi, dword [esp + 0x10]
add ebx, dword [esp + 0x10]
jmp 0x41667f
jns 0x41665e
and eax, 0xffff
jmp 0x416666
mov ecx, dword [esp + 0x10]
lea eax, [eax + ecx + 2]
push eax
push dword [esp + 0x24]
call dword [esp + 0x20]
test eax, eax
je 0x416743
mov dword [ebx], eax
add esi, 4
add ebx, 4
mov eax, dword [esi]
test eax, eax
jne 0x416655
add edi, 0x14
xor ebx, ebx
cmp dword [edi], ebx
jne 0x41662e
lea esi, [esp + 0x24]
mov eax, 0xc4
call fcn.004066cb
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x42474c], eax
cmp eax, ebx
je 0x416743
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4046f4
push eax
call esi
push 0x404704
push dword [0x42474c]
mov dword [0x424750], eax
call esi
push 0x404718
push dword [0x42474c]
mov dword [0x424754], eax
call esi
push 0x404734
push dword [0x42474c]
mov dword [0x424758], eax
call esi
push 0x404748
push dword [0x42474c]
mov dword [0x42475c], eax
call esi
push 0x404754
push dword [0x42474c]
mov dword [0x424760], eax
call esi
mov dword [0x424764], eax
cmp dword [0x424750], ebx
jne 0x41672f
cmp dword [0x424754], ebx
je 0x416743
cmp dword [0x424758], ebx
je 0x416743
cmp dword [0x424760], ebx
je 0x416743
cmp eax, ebx
jne 0x41674a
xor al, al
jmp 0x4168ba
push ebx
push 0x80000
push ebx
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x424444], eax
cmp eax, ebx
jne 0x416774
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x424444], eax
mov byte [0x4235e3], 0
jmp 0x41677b
mov byte [0x4235e3], 1
call fcn.0041dfe0
push 0x425028
mov dword [0x423a78], ebx
mov byte [0x4235e2], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 0x38]
push eax
push 0x202
mov dword [0x424bfc], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov eax, dword [ebp + 8]
call fcn.004161c4
test al, al
je 0x416743
cmp dword [esp + 0x14], ebx
jne 0x4167e3
push ebx
push ebx
push 1
push 0x424768
call dword [sym.imp.KERNEL32.dll_CreateEventW]
or dword [0x424bf8], 0xffffffff
mov dword [0x424bf4], eax
cmp eax, ebx
je 0x416743
push 0x424740
push 0xffffffffffffffff
call fcn.00409d1c
mov dword [0x424734], eax
cmp eax, ebx
je 0x416743
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [0x424738], eax
push eax
mov eax, dword [0x424734]
push dword [eax]
call fcn.00409ab4
push dword [ebp + 8]
mov dword [0x42473c], eax
call fcn.00416243
test al, al
je 0x416743
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x4249a0], eax
mov dword [0x4249a4], ebx
cmp dword [esp + 0x14], ebx
jne 0x416849
call fcn.004162a5
jmp 0x41684b
mov al, 1
test al, al
je 0x416743
cmp dword [esp + 0x14], ebx
jne 0x416860
call fcn.004162f7
jmp 0x416862
mov al, 1
test al, al
je 0x416743
push dword [ebp + 8]
call fcn.00416345
test al, al
je 0x416743
xor eax, eax
test byte [ebp + 8], 2
mov dword [0x424454], ebx
mov word [0x424c00], ax
mov word [0x4245c0], ax
mov word [0x4235e8], ax
mov word [0x423580], ax
mov word [0x4244d8], ax
mov word [0x424470], ax
je 0x4168b3
call fcn.004163fc
jmp 0x4168b5
mov al, 1
test al, al
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4