Function at 0x10058700
Capabilities:
Get system information on windows
Initialize winsock library

Disassembly:
sub esp, 0x1bc
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0xa0]
xor esi, esi
cmp eax, esi
push edi
je 0x1005872a
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1bc
ret 4
mov ecx, 0x63
xor eax, eax
lea edi, [esp + 0x3e]
mov word [esp + 0x3c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x3c]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10058761
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1bc
ret 4
mov ecx, dword [esp + 0x1d0]
xor eax, eax
mov dword [ebx + 0x9c], ecx
mov ecx, 8
lea edi, [esp + 0x1c]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], esi
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x1c]
push esi
push esi
push esi
push 0xffffffffffffffff
mov dword [ebx], eax
mov dword [ebx + 4], 1
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
cmp eax, esi
mov dword [ebx + 8], eax
jne 0x100587b8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1bc
ret 4
mov eax, dword [ebx + 0x84]
cmp eax, esi
je 0x100587d1
push eax
call fcn.1017c36b
add esp, 4
mov dword [ebx + 0x84], esi
push 0x4e1c
call fcn.1017c342
mov edi, eax
mov ecx, 0x1387
xor eax, eax
mov dword [ebx + 0x84], edi
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x30]
add esp, 4
mov dword [ebx + 0x88], 0x1387
lea ebp, [ecx + ecx]
cmp ebp, esi
jne 0x1005883f
mov edi, dword [ebx + 0x28]
cmp edi, esi
je 0x10058834
mov eax, dword [ebx + 0x2c]
mov edx, eax
dec eax
test edx, edx
je 0x10058825
lea ebp, [eax + 1]
mov eax, dword [edi]
push esi
mov ecx, edi
call dword [eax]
add edi, 0x2c
dec ebp
jne 0x10058818
mov ecx, dword [ebx + 0x28]
push ecx
call fcn.1017c36b
add esp, 4
mov dword [ebx + 0x28], esi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x2c], esi
jmp 0x10058962
mov ecx, dword [ebx + 0x28]
cmp ecx, esi
jne 0x1005886f
lea edx, [ebp + ebp*4]
lea eax, [ebp + edx*2]
shl eax, 2
push eax
call fcn.1017c342
push ebp
push eax
mov dword [ebx + 0x28], eax
call fcn.1005b330
add esp, 0xc
mov dword [ebx + 0x30], ebp
mov dword [ebx + 0x2c], ebp
jmp 0x10058962
mov edi, dword [ebx + 0x30]
cmp ebp, edi
jg 0x100588bd
mov eax, dword [ebx + 0x2c]
cmp eax, ebp
jge 0x1005889c
mov edx, ebp
sub edx, eax
push edx
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
lea ecx, [ecx + eax*4]
push ecx
call fcn.1005b330
add esp, 8
mov dword [ebx + 0x2c], ebp
jmp 0x10058962
jle 0x100588b5
sub eax, ebp
lea edx, [ebp + ebp*4]
push eax
lea eax, [ebp + edx*2]
lea ecx, [ecx + eax*4]
push ecx
call fcn.1005b300
add esp, 8
mov dword [ebx + 0x2c], ebp
jmp 0x10058962
mov eax, dword [ebx + 0x34]
cmp eax, esi
jne 0x100588e8
mov eax, dword [ebx + 0x2c]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x100588dc
mov eax, 4
jmp 0x100588e8
cmp eax, 0x400
jle 0x100588e8
mov eax, 0x400
add eax, edi
cmp ebp, eax
jge 0x100588f4
mov dword [esp + 0x10], eax
jmp 0x100588fa
mov dword [esp + 0x10], ebp
mov eax, ebp
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
shl eax, 2
push eax
call fcn.1017c342
mov ecx, dword [ebx + 0x2c]
mov esi, dword [ebx + 0x28]
mov edi, eax
mov dword [esp + 0x18], eax
lea edx, [ecx + ecx*4]
lea ecx, [ecx + edx*2]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x2c]
sub edx, ecx
push edx
lea edx, [ecx + ecx*4]
lea ecx, [ecx + edx*2]
lea edx, [eax + ecx*4]
push edx
call fcn.1005b330
mov eax, dword [ebx + 0x28]
push eax
call fcn.1017c36b
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add esp, 0x10
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], ebp
mov dword [ebx + 0x30], edx
xor esi, esi
cmp dword [0x10201328], esi
je 0x10058988
mov eax, dword [esp + 0x2c]
push eax
push str.CSocketSystem::Initialize__dwNumberOfProcessors:_d_
push str.DataProc
push 1
push 0x10200a94
call fcn.1008b760
add esp, 0x14
mov eax, dword [ebx + 0x2c]
xor ebp, ebp
cmp eax, esi
jle 0x100589b5
xor edi, edi
mov edx, dword [ebx + 0x28]
mov ecx, edi
add ecx, edx
mov dword [ecx + 0x28], ebx
call fcn.10087510
test eax, eax
je 0x100587a9
mov eax, dword [ebx + 0x2c]
inc ebp
add edi, 0x2c
cmp ebp, eax
jl 0x10058993
push esi
push closesocket
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
lea esi, [ebx + 0x38]
push 0xffffffffffffffff
push 1
mov ecx, esi
mov dword [ebx + 0x60], eax
call fcn.1005ad70
mov eax, dword [ebx + 0x3c]
xor ebp, ebp
test eax, eax
jle 0x100589ff
xor edi, edi
mov ecx, dword [esi]
mov dword [ecx + edi + 0x28], ebx
add ecx, edi
call fcn.10087510
test eax, eax
je 0x100587a9
mov eax, dword [ebx + 0x3c]
inc ebp
add edi, 0x2c
cmp ebp, eax
jl 0x100589df
mov eax, 1
pop edi
pop esi
mov dword [ebx + 0x24], 0
mov dword [ebx + 0xa0], eax
pop ebp
pop ebx
add esp, 0x1bc
ret 4