Function at 0x1004be30
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x1007dcf9
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x10097060]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10097060]
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, 0x10085ec8
mov dword [esp + 0x150], edi
call fcn.10001a30
mov byte [esp + 0x14c], 1
call fcn.10002380
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 + 0x4b8]
mov eax, dword [eax]
lea ecx, [esi + 0x4b4]
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 0x1004bee3
cmp ebx, ecx
je 0x1004bee8
call fcn.10067664
cmp edi, esi
je 0x1004c125
test ebx, ebx
jne 0x1004bef9
call fcn.10067664
cmp edi, dword [ebx + 4]
jne 0x1004bf03
call fcn.10067664
mov eax, dword [edi + 0xc]
add edi, 0xc
cmp dword [eax - 0xc], 0
jg 0x1004bf14
or ebp, 0xffffffff
jmp 0x1004bf2e
push 0x7c
push eax
call fcn.10068ce4
add esp, 8
test eax, eax
jne 0x1004bf28
or ebp, 0xffffffff
jmp 0x1004bf2e
sub eax, dword [edi]
sar eax, 1
mov ebp, eax
mov ecx, dword [esp + 0x30]
cmp ecx, dword [ebx + 4]
jne 0x1004bf3c
call fcn.10067664
mov ecx, dword [edi]
mov esi, dword [esp + 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x1004bf98
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x1004bf87
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x1004bf87
call fcn.10001cb0
mov dword [esp + 0x28], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x1004bf7a
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 0x1004bf94
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x1c]
call fcn.10002470
mov ebx, dword [esp + 0x2c]
test ebp, ebp
jle 0x1004c041
mov edx, dword [esp + 0x30]
cmp edx, dword [ebx + 4]
jne 0x1004bfae
call fcn.10067664
mov eax, ebp
lea ecx, [esp + 0x38]
mov edx, edi
call fcn.10014840
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 0x1004c019
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x1004c008
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x1004c008
call fcn.10001cb0
mov ebp, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x1004bfff
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 0x1004c019
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x1c]
call fcn.10002470
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 0x1004c041
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x154]
mov ecx, 0x10085ec8
mov eax, esi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1004c076
test dx, dx
je 0x1004c072
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1004c076
add eax, 4
add ecx, 4
test dx, dx
jne 0x1004c050
xor eax, eax
jmp 0x1004c07b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x1004c0c9
mov ecx, dword [esp + 0x18]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x1004c0e3
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1004c0bb
test dx, dx
je 0x1004c0b7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1004c0bb
add eax, 4
add ecx, 4
test dx, dx
jne 0x1004c095
xor eax, eax
jmp 0x1004c0c0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
jne 0x1004c0ed
lea esi, [esp + 0x2c]
call fcn.10016e60
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
jmp 0x1004bed8
push 0x80004005
call fcn.10002ec0
mov esi, dword [esp + 0x30]
cmp esi, dword [ebx + 4]
jne 0x1004c0fb
call fcn.10067664
lea ebx, [esi + 0x10]
lea ecx, [esp + 0x1c]
cmp ecx, ebx
je 0x1004c125
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.10015a40
mov eax, edi
call fcn.10015b10
mov eax, dword [esp + 0x20]
mov edi, dword [eax]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, dword [esp + 0x20]
je 0x1004c247
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 [0x1009a4ac]
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 0x1004c173
call fcn.10067664
mov edx, dword [edi + 0xc]
push edx
call fcn.100641b0
mov esi, dword [esp + 0x2c]
cdq
idiv esi
add esp, 4
cmp edi, dword [esp + 0x20]
mov ebx, eax
jne 0x1004c193
call fcn.10067664
mov eax, dword [edi + 0x10]
cdq
idiv esi
sub eax, ebx
test eax, eax
jle 0x1004c1e8
mov ebx, eax
cmp edi, dword [esp + 0x20]
jne 0x1004c1ac
call fcn.10067664
mov eax, dword [edi + 0xc]
push esi
push eax
lea ecx, [esp + 0x44]
push str.BuyMerchantItem__d___d_
push ecx
call fcn.10068024
add esp, 0x10
push 0x1f4
call ebp
mov ecx, dword [0x1009a210]
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 0x1004c1a1
push 0x7d0
call ebp
cmp byte [edi + 0x15], 0
je 0x1004c1ff
call fcn.10067664
jmp 0x1004c131
mov eax, dword [edi + 8]
cmp byte [eax + 0x15], 0
jne 0x1004c225
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x15], 0
jne 0x1004c131
mov edi, eax
mov eax, dword [edi]
cmp byte [eax + 0x15], 0
je 0x1004c216
jmp 0x1004c131
mov eax, dword [edi + 4]
cmp byte [eax + 0x15], 0
jne 0x1004c240
mov edi, edi
cmp edi, dword [eax + 8]
jne 0x1004c240
mov edi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x1004c230
mov edi, eax
jmp 0x1004c131
lea eax, [esp + 0x1c]
mov byte [esp + 0x14c], 1
call fcn.10015dd0
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 0x1004c280
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 0x1004c2ae
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.100673c5
add esp, 0x13c
ret 4