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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x76c
push ebx
push esi
mov esi, dword [ebp + 8]
and esi, 2
push edi
mov dword [esp + 0x14], esi
jne 0x418dc3
xor ebx, ebx
mov dword [0x436d60], ebx
jmp 0x418dc5
xor ebx, ebx
call fcn.00418a18
mov edi, eax
mov dword [0x436d78], edi
cmp edi, ebx
je 0x418f59
cmp esi, ebx
jne 0x418df7
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x436d74], eax
cmp eax, ebx
je 0x418f59
jmp 0x418ea4
push 0x409fc0
call fcn.00418952
push 0x409fd0
mov dword [esp + 0x1c], eax
call fcn.00418952
mov dword [esp + 0x1c], eax
mov eax, dword [0x436d74]
mov ecx, dword [eax + 0x3c]
mov dword [esp + 0x10], eax
lea ecx, [ecx + eax + 0x80]
cmp dword [esp + 0x1c], ebx
je 0x418ea4
cmp dword [esp + 0x18], ebx
je 0x418ea4
mov edi, dword [ecx]
cmp edi, ebx
jbe 0x418ea4
cmp dword [ecx + 4], 0x14
jbe 0x418ea4
add edi, eax
cmp dword [edi], ebx
je 0x418ea4
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 0x418f59
mov esi, dword [edi]
mov ebx, dword [edi + 0x10]
add esi, dword [esp + 0x10]
add ebx, dword [esp + 0x10]
jmp 0x418e95
jns 0x418e74
and eax, 0xffff
jmp 0x418e7c
mov ecx, dword [esp + 0x10]
lea eax, [eax + ecx + 2]
push eax
push dword [esp + 0x24]
call dword [esp + 0x20]
test eax, eax
je 0x418f59
mov dword [ebx], eax
add esi, 4
add ebx, 4
mov eax, dword [esi]
test eax, eax
jne 0x418e6b
add edi, 0x14
xor ebx, ebx
cmp dword [edi], ebx
jne 0x418e44
lea esi, [esp + 0x24]
mov eax, 0x136
call fcn.0041755d
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x436d7c], eax
cmp eax, ebx
je 0x418f59
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x409fe0
push eax
call esi
push 0x409ff0
push dword [0x436d7c]
mov dword [0x436d80], eax
call esi
push 0x40a004
push dword [0x436d7c]
mov dword [0x436d84], eax
call esi
push 0x40a020
push dword [0x436d7c]
mov dword [0x436d88], eax
call esi
push 0x40a034
push dword [0x436d7c]
mov dword [0x436d8c], eax
call esi
push 0x40a040
push dword [0x436d7c]
mov dword [0x436d90], eax
call esi
mov dword [0x436d94], eax
cmp dword [0x436d80], ebx
jne 0x418f45
cmp dword [0x436d84], ebx
je 0x418f59
cmp dword [0x436d88], ebx
je 0x418f59
cmp dword [0x436d90], ebx
je 0x418f59
cmp eax, ebx
jne 0x418f60
xor al, al
jmp 0x419129
push ebx
push 0x80000
push ebx
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x4367e0], eax
cmp eax, ebx
jne 0x418f8a
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x4367e0], eax
mov byte [0x435a0b], 0
jmp 0x418f91
mov byte [0x435a0b], 1
push 0x435978
mov dword [0x435a14], ebx
mov byte [0x435a0a], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 0x38]
push eax
push 0x202
mov dword [0x435990], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
call fcn.00418d34
test eax, eax
jne 0x418f59
mov edi, dword [ebp + 8]
mov eax, edi
call fcn.00418a52
test al, al
je 0x418f59
cmp dword [esp + 0x14], ebx
jne 0x418fff
push ebx
push ebx
push 1
push 0x436d98
call dword [sym.imp.KERNEL32.dll_CreateEventW]
or dword [0x437170], 0xffffffff
mov dword [0x43716c], eax
cmp eax, ebx
je 0x418f59
push 0x436d70
push 0xffffffffffffffff
call fcn.0042eaa7
mov dword [0x436d64], eax
cmp eax, ebx
je 0x418f59
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [0x436d68], eax
push eax
mov eax, dword [0x436d64]
push dword [eax]
call fcn.0042d7d3
push edi
mov dword [0x436d6c], eax
call fcn.00418ad1
test al, al
je 0x418f59
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x436fd0], eax
mov dword [0x436fd4], ebx
cmp dword [esp + 0x14], ebx
jne 0x4190b8
mov esi, dword [0x436d74]
mov eax, esi
call fcn.0043263a
cmp eax, ebx
je 0x418f59
mov eax, dword [eax + 0xc]
add eax, esi
je 0x418f59
sub eax, esi
mov dword [0x437168], eax
cmp dword [esp + 0x14], ebx
jne 0x4190b8
lea eax, [esp + 0x1c8]
call fcn.00419601
push ebx
lea eax, [esp + 0x4d6]
push eax
push dword [0x436d6c]
mov ecx, 0x437118
push 0x436fd8
mov eax, 0x84939312
call fcn.00431eea
push edi
call fcn.00418b33
test al, al
je 0x418f59
xor eax, eax
mov dword [0x4367f0], ebx
mov word [0x437708], ax
mov word [0x4359a8], ax
mov word [0x436930], ax
mov word [0x4368c8], ax
mov word [0x436860], ax
mov word [0x437660], ax
mov word [0x4375d8], ax
mov word [0x4371b0], ax
mov dword [eax + 0x435010], ebx
mov dword [eax + 0x43500c], ebx
mov dword [eax + 0x435004], ebx
mov dword [eax + 0x435008], ebx
add eax, 0x14
cmp eax, 0x28
jb 0x4190fe
push edi
call fcn.00418bea
test al, al
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4