Function at 0x58da10
Capabilities:
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x74787e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xdc
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x54]
mov dword [esp + 0x20], esi
call fcn.00412d40
xor eax, eax
mov dword [esp + 0xf4], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], vtable.CBSList_class_CWallPiece__.0
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0xc0]
lea ecx, [esi + 0xc0]
mov byte [esp + 0xf4], 1
mov dword [esp + 0x24], ecx
call dword [eax + 0x20]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x298]
test eax, eax
je 0x58def1
mov ecx, esi
mov eax, dword [ecx + 0x50]
add ecx, 0x50
call dword [eax + 0x2c]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x58dcff
lea esp, [esp]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x50]
add ecx, 0x50
lea eax, [esp + 0x1c]
push eax
call dword [edx + 0x34]
mov edx, dword [eax]
mov eax, edx
shr eax, 0x18
sub eax, 0
je 0x58daf8
sub eax, 1
je 0x58daea
sub eax, 1
jne 0x58dcf4
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2e4]
jmp 0x58db04
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2e0]
jmp 0x58db04
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2dc]
mov eax, dword [ecx]
push edx
call dword [eax + 0x18]
test eax, eax
je 0x58dcf4
lea ecx, [eax - 0x18]
test ecx, ecx
je 0x58dcf4
mov edx, dword [ecx]
call dword [edx + 0x58]
mov ebx, eax
test ebx, ebx
je 0x58dcf4
mov ecx, ebx
call fcn.005e96f0
mov esi, dword [eax + 0xc]
push 0x11
push str.castle_wall_gate_
push esi
call fcn.007201cc
add esp, 0xc
test eax, eax
je 0x58db62
push 0x16
push str.castle_wall_smallgate_
push esi
call fcn.007201cc
add esp, 0xc
test eax, eax
jne 0x58dcf4
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x84]
push edx
push str.guard
mov ecx, ebx
call dword [eax + 0x15c]
test eax, eax
je 0x58dcf4
push esi
lea ecx, [esp + 0x58]
call fcn.00413310
push 2
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x5c]
call fcn.004011b0
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0xf8], 2
call fcn.004133c0
lea ecx, [esp + 0x4c]
mov byte [esp + 0xf4], 1
call fcn.00412de0
mov esi, dword [esp + 0x54]
mov ax, word [esi + 2]
xor ecx, ecx
cmp ax, 0x64
sete cl
xor edx, edx
cmp word [esi], ax
setne dl
cmp ax, 0x72
lea ecx, [ecx + ecx - 1]
mov dword [esp + 0x64], ecx
lea edx, [edx + edx - 1]
mov dword [esp + 0x60], edx
jne 0x58dc04
mov dword [esp + 0x60], 1
mov dword [esp + 0x64], 0
cmp ax, 0x6c
jne 0x58dc1a
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x64], 0
xor ebp, ebp
cmp word [esp + 0x3c], bp
jbe 0x58dcf4
jmp 0x58dc30
mov ecx, dword [esp + 0x7c]
mov eax, dword [ecx + ebp*8 + 4]
lea edx, [eax + eax*2]
mov eax, dword [ecx + ebp*8]
lea edi, [eax + eax*2]
lea ecx, [edx*8]
mov eax, 0x66666667
imul ecx
mov eax, dword [ebx]
sar edx, 1
mov esi, edx
lea ecx, [esp + 0x70]
push ecx
shr esi, 0x1f
mov ecx, ebx
add esi, edx
call dword [eax + 0x148]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push 0x50
add edi, ecx
add esi, eax
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0xf4], 3
je 0x58dcd0
mov edx, dword [esp + 0x60]
push 1
push 0
push 0
push 1
push 1
sub esp, 0xc
mov ecx, esp
add edx, edi
mov dword [ecx], edx
mov edx, dword [esp + 0x84]
add edx, esi
mov dword [ecx + 4], edx
mov dword [esp + 0x34], esp
xor edx, edx
mov dword [ecx + 8], edx
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edi
mov dword [ecx + 4], esi
mov dword [ecx + 8], edx
mov ecx, eax
mov dword [esp + 0x40], esp
call fcn.005e8830
jmp 0x58dcd2
xor eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
push eax
mov byte [esp + 0xf8], 1
call dword [edx + 4]
movzx eax, word [esp + 0x3c]
add ebp, 1
cmp ebp, eax
jl 0x58dc30
cmp dword [esp + 0x1c], 0
jne 0x58dab0
mov ebp, dword [esp + 0x20]
cmp word [ebp + 0xbc], 1
jbe 0x58def1
mov edx, dword [ebp + 0x50]
lea ebx, [ebp + 0x50]
mov ecx, ebx
call dword [edx + 0x2c]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x58ddfd
mov eax, dword [ebx]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebx
call dword [eax + 0x34]
mov edx, dword [eax]
mov eax, edx
shr eax, 0x18
sub eax, 0
je 0x58dd69
sub eax, 1
je 0x58dd5b
sub eax, 1
jne 0x58ddf2
mov eax, dword [0x912e94]
mov ecx, dword [eax + 0x2e4]
jmp 0x58dd75
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2e0]
jmp 0x58dd75
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2dc]
mov eax, dword [ecx]
push edx
call dword [eax + 0x18]
test eax, eax
je 0x58ddf2
add eax, 0xffffffe8
je 0x58ddf2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x58]
mov esi, eax
test esi, esi
je 0x58ddf2
mov ecx, esi
call fcn.005e96f0
mov edi, dword [eax + 0xc]
push str.castle_wall_corner
push edi
call fcn.0071f59b
add esp, 8
test eax, eax
je 0x58ddc1
push 0x12
push 0x7c7b9c
push edi
call fcn.007201cc
add esp, 0xc
test eax, eax
jne 0x58ddf2
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x28]
call dword [eax + 0x60]
mov dword [eax], esi
mov dword [eax + 4], 0
cmp dword [esp + 0x30], 0
jne 0x58dde2
mov dword [esp + 0x30], eax
jmp 0x58dde9
mov ecx, dword [esp + 0x34]
mov dword [ecx + 4], eax
add dword [esp + 0x2c], 1
mov dword [esp + 0x34], eax
cmp dword [esp + 0x1c], 0
jne 0x58dd28
mov esi, dword [esp + 0x38]
push ebp
push 0x585290
lea ecx, [esp + 0x30]
mov dword [esp + 0x40], 0
call fcn.005ef170
mov eax, dword [esp + 0x30]
test eax, eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], eax
je 0x58def1
lea esp, [esp]
mov edx, dword [eax + 4]
mov dword [esp + 0x1c], edx
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0x4c]
push edx
call dword [eax + 0x148]
mov ebx, dword [eax]
mov ebp, dword [eax + 4]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x58de66
mov eax, dword [eax]
mov edx, dword [eax]
lea ecx, [esp + 0x70]
push ecx
mov ecx, eax
call dword [edx + 0x148]
jmp 0x58de7c
mov edx, dword [esp + 0x30]
mov ecx, dword [edx]
mov eax, dword [ecx]
lea edx, [esp + 0xe0]
push edx
call dword [eax + 0x148]
mov esi, dword [eax]
mov edi, dword [eax + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0xf4], 4
je 0x58ded1
mov ecx, 1
push ecx
push ecx
push ecx
push 2
push ecx
sub esp, 0xc
mov edx, esp
mov dword [edx + 8], ecx
mov dword [esp + 0x34], esp
mov dword [edx], esi
mov dword [edx + 4], edi
sub esp, 0xc
mov edx, esp
mov dword [edx + 8], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx], ebx
mov dword [edx + 4], ebp
call fcn.005e8830
jmp 0x58ded3
xor eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
push eax
mov byte [esp + 0xf8], 1
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x58de30
mov ecx, dword [esp + 0x20]
cmp word [ecx + 0xbc], 2
jb 0x58df0f
mov eax, dword [ecx]
call dword [eax + 0x298]
test eax, eax
jne 0x58e29b
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
lea eax, [esp + 0x4c]
push eax
call dword [edx + 0x148]
mov esi, dword [eax]
mov edi, dword [eax + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
xor ebx, ebx
cmp eax, ebx
mov byte [esp + 0xf4], 5
je 0x58df82
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
lea ecx, [esi + 0x200]
mov dword [edx], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [edi + 0x200]
mov dword [edx + 4], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58df84
xor eax, eax
mov ebp, dword [esp + 0x24]
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 6
je 0x58dff4
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
lea ecx, [edi - 0x200]
mov dword [edx + 4], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [esi + 0x200]
mov dword [edx], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58dff6
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 7
je 0x58e062
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
lea ecx, [esi - 0x200]
mov dword [edx], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [edi - 0x200]
mov dword [edx + 4], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58e064
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 8
je 0x58e0d0
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
lea ecx, [edi + 0x200]
mov dword [edx + 4], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [esi - 0x200]
mov dword [edx], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58e0d2
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 9
je 0x58e13e
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
lea ecx, [esi + 0x400]
mov dword [edx], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [edi + 0x400]
mov dword [edx + 4], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58e140
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 0xa
je 0x58e1ac
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
lea ecx, [edi - 0x400]
mov dword [edx + 4], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [esi + 0x400]
mov dword [edx], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58e1ae
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 0xb
je 0x58e21a
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x34], esp
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
lea ecx, [esi - 0x400]
mov dword [edx], ecx
sub esp, 0xc
mov edx, esp
lea ecx, [edi - 0x400]
mov dword [edx + 4], ecx
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx], esi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58e21c
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
push 0x50
call fcn.0040fa60
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0xf4], 0xc
je 0x58e288
push 1
push 1
push 2
push 3
push 1
sub esp, 0xc
mov edx, esp
mov dword [edx], esi
mov dword [esp + 0x34], esp
mov dword [edx + 8], ebx
lea ecx, [edi + 0x400]
mov dword [edx + 4], ecx
sub esp, 0xc
mov edx, esp
add esi, 0xfffffc00
mov ecx, eax
mov dword [esp + 0x40], esp
mov dword [edx], esi
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
call fcn.005e8830
jmp 0x58e28a
xor eax, eax
mov edx, dword [ebp]
push eax
mov ecx, ebp
mov byte [esp + 0xf8], 1
call dword [edx + 4]
or eax, 0xffffffff
mov ecx, 1
xor edx, edx
mov dword [esp + 0x80], 0x7c7b98
mov dword [esp + 0x84], 0x7c7b94
mov dword [esp + 0x88], 0x7c7b90
mov dword [esp + 0x8c], str.snwe
mov dword [esp + 0x90], 0x7c7b84
mov dword [esp + 0x94], 0x7c7b7c
mov dword [esp + 0x98], 0x7c7b74
mov dword [esp + 0x9c], 0x7c7b6c
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], edx
mov dword [esp + 0xcc], edx
mov dword [esp + 0xd0], ecx
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xdc], eax
mov dword [esp + 0xa0], edx
mov dword [esp + 0xa4], edx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ecx
mov dword [esp + 0xbc], ecx
mov dword [esp + 0x44], edx
lea ecx, [esp + 0x4c]
call fcn.00412d40
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + eax + 0x80]
push ecx
lea edx, [esp + 0x50]
push str.guard_s
push edx
mov byte [esp + 0x100], 0xd
call fcn.00413950
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx]
add esp, 0xc
lea edx, [esp + 0x6c]
push edx
lea edx, [esp + 0x44]
push edx
lea edx, [esp + 0x80]
push edx
mov edx, dword [esp + 0x58]
push edx
call dword [eax + 0x15c]
test eax, eax
je 0x58e4f4
cmp word [esp + 0x40], 0
mov dword [esp + 0x48], 0
jbe 0x58e4f4
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + eax + 0xa0]
mov edx, dword [esp + eax + 0xc0]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
lea esp, [esp]
movzx esi, word [esp + 0x48]
mov ecx, dword [esp + 0x78]
mov eax, dword [ecx + esi*8]
mov ecx, dword [ecx + esi*8 + 4]
lea ecx, [ecx + ecx*2]
add ecx, ecx
lea ebx, [eax + eax*2]
add ecx, ecx
add ecx, ecx
mov eax, 0x66666667
imul ecx
mov eax, dword [esp + 0x6c]
sar edx, 1
mov edi, edx
shr edi, 0x1f
add edi, edx
test eax, eax
je 0x58e43e
movzx eax, byte [esi + eax]
mov dword [esp + 0x5c], eax
jmp 0x58e446
mov dword [esp + 0x5c], 0
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
lea eax, [esp + 0x60]
push eax
call dword [edx + 0x148]
mov esi, dword [eax + 4]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esi, edi
mov edi, dword [eax]
add edi, ebx
push 0x50
lea ebp, [ecx + esi]
lea ebx, [edx + edi]
call fcn.0040fa60
add esp, 4
mov dword [esp + 0xe0], eax
test eax, eax
mov byte [esp + 0xf4], 0xe
je 0x58e4ca
mov ecx, dword [esp + 0x5c]
push 1
push 0
push 1
push 1
push 1
sub esp, 0xc
mov edx, esp
mov dword [edx + 8], ecx
mov dword [esp + 0x90], esp
mov dword [edx], ebx
mov dword [edx + 4], ebp
sub esp, 0xc
mov edx, esp
mov dword [edx + 8], ecx
mov ecx, eax
mov dword [esp + 0x9c], esp
mov dword [edx], edi
mov dword [edx + 4], esi
call fcn.005e8830
jmp 0x58e4cc
xor eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
push eax
mov byte [esp + 0xf8], 0xd
call dword [edx + 4]
mov eax, dword [esp + 0x48]
add eax, 1
cmp ax, word [esp + 0x40]
mov dword [esp + 0x48], eax
jb 0x58e400
lea ecx, [esp + 0x4c]
mov byte [esp + 0xf4], 1
call fcn.00412de0
mov eax, dword [esp + 0x44]
add eax, 4
cmp eax, 0x20
mov dword [esp + 0x44], eax
jl 0x58e371
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
push 0
push 0x5e85c0
call dword [eax + 0x58]
mov dword [esp + 0x28], vtable.CBSList_class_CWallPiece__.0
mov eax, dword [esp + 0x30]
test eax, eax
mov byte [esp + 0xf4], 0xf
je 0x58e55c
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x30], ecx
push eax
lea ecx, [esp + 0x2c]
call dword [edx + 0x64]
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x58e541
xor eax, eax
lea ecx, [esp + 0x54]
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], vtable.CBList_class_CWallPiece__.0
mov dword [esp + 0xf4], 0xffffffff
call fcn.00412de0
mov ecx, dword [esp + 0xec]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret