Function at 0x10058550
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x10098229
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x100b8070]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100b8070]
xor eax, esp
push eax
lea eax, [esp + 0x144]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [esp + 0x18]
xor edi, edi
push eax
mov ecx, 0x100a2f24
mov dword [esp + 0x150], edi
call fcn.10003700
mov byte [esp + 0x14c], 1
call fcn.10001f80
mov dword [esp + 0x20], eax
mov byte [eax + 0x15], 1
mov eax, dword [esp + 0x20]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x20]
mov dword [eax], eax
mov eax, dword [esp + 0x20]
mov dword [eax + 8], eax
mov dword [esp + 0x24], edi
mov byte [esp + 0x14c], 2
mov eax, dword [esi + 0x4ac]
mov eax, dword [eax]
lea ecx, [esi + 0x4a8]
mov ebx, ecx
mov edi, eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], edi
test ebx, ebx
mov esi, dword [ecx + 4]
je 0x10058603
cmp ebx, ecx
je 0x10058608
call fcn.10080d40
cmp edi, esi
je 0x10058845
test ebx, ebx
jne 0x10058619
call fcn.10080d40
cmp edi, dword [ebx + 4]
jne 0x10058623
call fcn.10080d40
mov eax, dword [edi + 0xc]
add edi, 0xc
cmp dword [eax - 0xc], 0
jg 0x10058634
or ebp, 0xffffffff
jmp 0x1005864e
push 0x7c
push eax
call fcn.100824d4
add esp, 8
test eax, eax
jne 0x10058648
or ebp, 0xffffffff
jmp 0x1005864e
sub eax, dword [edi]
sar eax, 1
mov ebp, eax
mov ecx, dword [esp + 0x30]
cmp ecx, dword [ebx + 4]
jne 0x1005865c
call fcn.10080d40
mov ecx, dword [edi]
mov esi, dword [esp + 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x100586b8
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x100586a7
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x100586a7
call fcn.10001820
mov dword [esp + 0x28], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x1005869a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x28]
add ecx, 0x10
mov dword [esp + 0x18], ecx
jmp 0x100586b4
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x1c]
call fcn.10002ce0
mov ebx, dword [esp + 0x2c]
test ebp, ebp
jle 0x10058761
mov edx, dword [esp + 0x30]
cmp edx, dword [ebx + 4]
jne 0x100586ce
call fcn.10080d40
mov eax, ebp
lea ecx, [esp + 0x38]
mov edx, edi
call fcn.100135f0
mov byte [esp + 0x14c], 3
mov ecx, dword [eax]
mov esi, dword [esp + 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x10058739
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x10058728
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x10058728
call fcn.10001820
mov ebp, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x1005871f
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x18], ebp
jmp 0x10058739
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x1c]
call fcn.10002ce0
mov ebx, dword [esp + 0x2c]
mov byte [esp + 0x14c], 2
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10058761
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x154]
mov ecx, 0x100a2f24
mov eax, esi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10058796
test dx, dx
je 0x10058792
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10058796
add eax, 4
add ecx, 4
test dx, dx
jne 0x10058770
xor eax, eax
jmp 0x1005879b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x100587e9
mov ecx, dword [esp + 0x18]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x10058803
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100587db
test dx, dx
je 0x100587d7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100587db
add eax, 4
add ecx, 4
test dx, dx
jne 0x100587b5
xor eax, eax
jmp 0x100587e0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
jne 0x1005880d
lea esi, [esp + 0x2c]
call fcn.10015ce0
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
jmp 0x100585f8
push 0x80004005
call fcn.10002250
mov esi, dword [esp + 0x30]
cmp esi, dword [ebx + 4]
jne 0x1005881b
call fcn.10080d40
lea ebx, [esi + 0x10]
lea ecx, [esp + 0x1c]
cmp ecx, ebx
je 0x10058845
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push eax
push ecx
push edx
mov esi, ecx
push esi
lea edx, [esp + 0x3c]
push edx
mov edi, ecx
call fcn.100147c0
mov eax, edi
call fcn.10014890
mov eax, dword [esp + 0x20]
mov edi, dword [eax]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, dword [esp + 0x20]
je 0x10058967
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x34]
sub eax, 1
lea ebx, ds:[eax + eax*4]
mov ecx, dword [0x100bb594]
lea ebx, ds:[ecx + ebx*8]
mov esi, ebx
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x28], eax
cmp edi, dword [esp + 0x20]
jne 0x10058893
call fcn.10080d40
mov edx, dword [edi + 0xc]
push edx
call fcn.1007d850
mov esi, dword [esp + 0x2c]
cdq
idiv esi
add esp, 4
cmp edi, dword [esp + 0x20]
mov ebx, eax
jne 0x100588b3
call fcn.10080d40
mov eax, dword [edi + 0x10]
cdq
idiv esi
sub eax, ebx
test eax, eax
jle 0x10058908
mov ebx, eax
cmp edi, dword [esp + 0x20]
jne 0x100588cc
call fcn.10080d40
mov eax, dword [edi + 0xc]
push esi
push eax
lea ecx, [esp + 0x44]
push str.BuyMerchantItem__d___d_
push ecx
call fcn.100817e4
add esp, 0x10
push 0x1f4
call ebp
mov ecx, dword [0x100bb2cc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x98]
lea eax, [esp + 0x3c]
push eax
call edx
push 0x64
call ebp
sub ebx, 1
jne 0x100588c1
push 0x7d0
call ebp
cmp byte [edi + 0x15], 0
je 0x1005891f
call fcn.10080d40
jmp 0x10058851
mov eax, dword [edi + 8]
cmp byte [eax + 0x15], 0
jne 0x10058945
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x15], 0
jne 0x10058851
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x15], 0
je 0x10058936
jmp 0x10058851
mov eax, dword [edi + 4]
cmp byte [eax + 0x15], 0
jne 0x10058960
mov edi, edi
cmp edi, dword [eax + 8]
jne 0x10058960
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x10058950
mov edi, eax
jmp 0x10058851
lea eax, [esp + 0x1c]
mov byte [esp + 0x14c], 1
call fcn.10014b90
mov byte [esp + 0x14c], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100589a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x14c], 0xffffffff
mov eax, dword [esp + 0x154]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100589ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x144]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.10080c07
add esp, 0x13c
ret 4