Function at 0x40b310
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x8550f6
mov eax, dword fs:[0]
push eax
sub esp, 0x3e8
mov eax, dword [0x8943b8]
xor eax, esp
mov dword [esp + 0x3e0], eax
push ebx
push esi
push edi
mov eax, dword [0x8943b8]
xor eax, esp
push eax
lea eax, [esp + 0x3f8]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x5c], ebx
push edi
lea ecx, [esp + 0x60]
mov dword [esp + 0x404], ebx
call fcn.0040d1e0
push 0x100
lea eax, [esp + 0xd8]
push eax
push ebx
push ebx
push 0x104
lea ecx, [esp + 0x1f0]
push ecx
push ebx
push ebx
push edi
call fcn.00821cc9
mov ebx, dword [esp + 0x80]
mov edx, dword [ebx]
mov edx, dword [edx + 4]
add esp, 0x24
push 4
lea eax, [esp + 0xb0]
push eax
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x48]
push ecx
mov ecx, ebx
call edx
mov ecx, dword [esp + 0x44]
xor eax, eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x94]
push eax
push ecx
lea edx, [esp + 0x3c]
push edx
xor edi, edi
call fcn.0040c920
mov byte [esp + 0x400], 1
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x48]
push eax
lea ecx, [esi + 4]
push edx
mov dword [esp + 0x50], edi
mov dword [esp + 0x20], ecx
call fcn.0040c5f0
cmp dword [esp + 0x44], edi
mov dword [esp + 0x20], edi
jbe 0x40b6ef
xor esi, esi
mov dword [esp + 0x28], esi
mov edi, edi
push 0x104
lea eax, [esp + 0xd8]
push esi
push eax
call fcn.008201b0
mov edx, dword [ebx]
mov edx, dword [edx + 4]
add esp, 0xc
push 4
lea eax, [esp + 0x4c]
push eax
mov ecx, ebx
call edx
mov ecx, dword [esp + 0x48]
mov eax, dword [ebx]
mov eax, dword [eax + 4]
push ecx
lea edx, [esp + 0xd8]
push edx
mov ecx, ebx
call eax
lea ecx, [esp + 0xd4]
push ecx
lea edx, [esp + 0x1e0]
push edx
lea eax, [esp + 0x2ec]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x30]
push ecx
mov edi, 0x89ff08
mov dword [esp + 0x34], esi
call fcn.004026a0
push esi
push eax
xor ecx, ecx
lea edx, [esp + 0x2ec]
mov dword [eax], esi
call fcn.00408cf0
test eax, eax
jge 0x40b4cd
mov edx, dword [esp + 0x30]
push edx
mov eax, edi
call fcn.00402810
mov dword [esp + 0x30], esi
jmp 0x40b4d5
mov eax, dword [esp + 0x30]
mov dword [esp + 0x30], eax
mov esi, dword [esp + 0x18]
mov edi, dword [esi + 4]
test edi, edi
je 0x40b6e5
mov ecx, dword [esi + 8]
mov eax, ecx
sub eax, edi
sar eax, 2
cmp eax, dword [esp + 0x20]
jbe 0x40b6e5
cmp edi, ecx
jbe 0x40b501
call fcn.0081ff70
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x50], edi
lea edi, [edi + ecx*4]
cmp edi, dword [esi + 8]
ja 0x40b516
cmp edi, dword [esi + 4]
jae 0x40b51b
call fcn.0081ff70
cmp edi, dword [esi + 8]
jb 0x40b525
call fcn.0081ff70
mov edx, dword [esp + 0x30]
mov dword [edi], edx
mov edx, dword [esp + 0x38]
test edx, edx
je 0x40b6ea
mov ecx, dword [esp + 0x3c]
mov eax, ecx
sub eax, edx
sar eax, 4
cmp eax, dword [esp + 0x20]
jbe 0x40b6ea
cmp edx, ecx
mov edi, edx
jbe 0x40b55f
call fcn.0081ff70
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x50], edi
add edi, eax
cmp edi, ecx
ja 0x40b577
cmp edi, edx
jae 0x40b57c
call fcn.0081ff70
cmp edi, dword [esi + 8]
jb 0x40b586
call fcn.0081ff70
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push 4
push edi
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x40b6ea
mov edx, dword [esp + 0x3c]
mov eax, edx
sub eax, ecx
sar eax, 4
cmp eax, dword [esp + 0x20]
jbe 0x40b6ea
cmp ecx, edx
mov edi, ecx
jbe 0x40b5c6
call fcn.0081ff70
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x50], edi
add edi, eax
cmp edi, edx
ja 0x40b5de
cmp edi, ecx
jae 0x40b5e3
call fcn.0081ff70
cmp edi, dword [esi + 8]
jb 0x40b5ed
call fcn.0081ff70
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push 4
add edi, 4
push edi
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x40b6ea
mov edx, dword [esp + 0x3c]
mov eax, edx
sub eax, ecx
sar eax, 4
cmp eax, dword [esp + 0x20]
jbe 0x40b6ea
cmp ecx, edx
mov edi, ecx
jbe 0x40b630
call fcn.0081ff70
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x50], edi
add edi, eax
cmp edi, edx
ja 0x40b648
cmp edi, ecx
jae 0x40b64d
call fcn.0081ff70
cmp edi, dword [esi + 8]
jb 0x40b657
call fcn.0081ff70
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push 4
add edi, 8
push edi
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x40b6ea
mov edx, dword [esp + 0x3c]
mov eax, edx
sub eax, ecx
sar eax, 4
cmp eax, dword [esp + 0x20]
jbe 0x40b6ea
cmp ecx, edx
mov edi, ecx
jbe 0x40b692
call fcn.0081ff70
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x50], edi
add edi, eax
cmp edi, edx
ja 0x40b6aa
cmp edi, ecx
jae 0x40b6af
call fcn.0081ff70
cmp edi, dword [esi + 8]
jb 0x40b6b9
call fcn.0081ff70
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push 4
add edi, 0xc
push edi
mov ecx, ebx
call eax
mov eax, dword [esp + 0x20]
add dword [esp + 0x28], 0x10
add eax, 1
cmp eax, dword [esp + 0x44]
mov dword [esp + 0x20], eax
jae 0x40b6ef
xor esi, esi
jmp 0x40b430
call fcn.0040c660
call fcn.0040c660
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 4
lea eax, [esp + 0x48]
push eax
mov ecx, ebx
call edx
cmp dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
jbe 0x40bd0e
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x2c]
push ecx
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 1
lea ecx, [esp + 0x2b]
push ecx
mov ecx, ebx
call edx
movsx eax, byte [esp + 0x27]
cmp eax, 6
ja case.default.0x40b740
jmp dword [eax*4 + 0x40bd7c]
push 0xac
call fcn.0081fbdc
add esp, 4
test eax, eax
je 0x40b77c
fldz
mov byte [eax + 0x14], 1
fst dword [eax + 4]
mov dword [eax], vtable.CDesignSprite.0
fstp dword [eax + 8]
mov esi, eax
mov dword [eax + 0x1c], 0
mov dword [eax + 0x18], vtable.CSprite.0
jmp 0x40b77e
xor esi, esi
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebx
call edx
mov ecx, dword [esp + 0x38]
test ecx, ecx
mov eax, dword [esp + 0x30]
mov edi, eax
je 0x40b7a9
mov edx, dword [esp + 0x3c]
sub edx, ecx
sar edx, 4
cmp eax, edx
jb 0x40b7b6
call fcn.0081ff70
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
shl edi, 4
add edi, ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 8]
test edx, edx
mov dword [esp + 0x2c], eax
je 0x40b7d6
mov ecx, dword [ecx + 0xc]
sub ecx, edx
sar ecx, 2
cmp eax, ecx
jb 0x40b7db
call fcn.0081ff70
mov eax, dword [edi + 4]
mov edx, dword [esi + 0x18]
mov edx, dword [edx + 0x10]
mov ecx, eax
neg ecx
push ecx
mov ecx, dword [edi]
neg ecx
push ecx
mov ecx, dword [edi + 0xc]
push ecx
mov ecx, dword [edi + 8]
push ecx
mov ecx, dword [esp + 0x2c]
push eax
mov eax, dword [edi]
push eax
mov eax, dword [ecx + 8]
mov ecx, dword [esp + 0x44]
mov eax, dword [eax + ecx*4]
push eax
lea ecx, [esi + 0x18]
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call edx
fild dword [esp + 0x14]
push 4
lea ecx, [esp + 0x18]
fstp dword [esi + 0xc]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push ecx
mov ecx, ebx
call edx
fild dword [esp + 0x14]
push 4
lea ecx, [esp + 0x7c]
fstp dword [esi + 0x10]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push ecx
mov ecx, ebx
call edx
test byte [esp + 0x78], 1
je 0x40b867
fld dword [0x87150c]
fstp dword [esi + 0xa0]
fld1
fstp dword [esi + 0xa4]
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x2c], esi
je 0x40b8a2
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0xb4]
push ecx
add edx, 0x20
push edx
mov dword [esp + 0x9c], esi
call fcn.0040c470
mov byte [esi + 0x14], 0
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x18]
mov ecx, dword [esi + 4]
add eax, 0x14
mov dword [esp + 0x18], eax
lea eax, [esp + 0x2c]
push eax
push ecx
push esi
call fcn.00415530
mov ecx, dword [esp + 0x18]
jmp 0x40bcea
push 0x18
call fcn.0081fbdc
add esp, 4
test eax, eax
je 0x40b8ec
fldz
mov dword [eax], vtable.CDesignObjectBase.0
fst dword [eax + 4]
mov byte [eax + 0x14], 1
fstp dword [eax + 8]
mov esi, eax
jmp 0x40b8ee
xor esi, esi
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 4
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
call edx
fild dword [esp + 0x14]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
fstp dword [esi + 0xc]
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call edx
fild dword [esp + 0x14]
mov dword [esp + 0x2c], esi
fstp dword [esi + 0x10]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40b957
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x84], eax
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0xc0]
push ecx
add edx, 0x20
push edx
mov dword [esp + 0x94], esi
call fcn.0040c470
mov byte [esi + 0x14], 0
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x18]
mov ecx, dword [esi + 4]
add eax, 0x14
mov dword [esp + 0x18], eax
lea eax, [esp + 0x2c]
push eax
push ecx
push esi
call fcn.00415530
mov ecx, dword [esp + 0x18]
jmp 0x40bcea
push 0xbc
call fcn.0081fbdc
xor edi, edi
add esp, 4
cmp eax, edi
je 0x40b9b4
fldz
mov byte [eax + 0x14], 1
fst dword [eax + 4]
mov dword [eax], vtable.CDesignGage.0
fstp dword [eax + 8]
mov dword [eax + 0x1c], edi
mov dword [eax + 0xb8], edi
mov dword [eax + 0x18], vtable.CGage.0
mov edi, eax
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 4
lea eax, [esp + 0x24]
push eax
mov ecx, ebx
call edx
mov eax, dword [esp + 0x38]
test eax, eax
mov ecx, dword [esp + 0x20]
mov esi, ecx
je 0x40b9df
mov edx, dword [esp + 0x3c]
sub edx, eax
sar edx, 4
cmp ecx, edx
jb 0x40b9ec
call fcn.0081ff70
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x20]
shl esi, 4
add esi, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 8]
add eax, 4
test edx, edx
mov dword [esp + 0x2c], ecx
je 0x40ba0f
mov eax, dword [eax + 8]
sub eax, edx
sar eax, 2
cmp ecx, eax
jb 0x40ba14
call fcn.0081ff70
mov ecx, dword [esi + 0xc]
movsx eax, byte [esp + 0x27]
push ecx
mov ecx, dword [esi + 8]
mov esi, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x24]
add ecx, 4
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + esi*4]
lea edx, [edi + 0x18]
sub eax, 2
push ecx
mov esi, edx
call fcn.0041b390
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 4
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
call edx
fild dword [esp + 0x14]
push 4
lea ecx, [esp + 0x18]
push ecx
fstp dword [edi + 0xc]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
mov ecx, ebx
call edx
fild dword [esp + 0x14]
push 4
lea ecx, [esp + 0x80]
fstp dword [edi + 0x10]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push ecx
mov ecx, ebx
call edx
test byte [esp + 0x7c], 1
je 0x40ba9c
fld dword [0x87150c]
fstp dword [edi + 0xa0]
fld1
fstp dword [edi + 0xa4]
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x2c], edi
je 0x40bad7
mov edx, dword [esp + 0x1c]
mov dword [esp + 0xa4], eax
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0xcc]
push ecx
add edx, 0x20
push edx
mov dword [esp + 0xb4], edi
call fcn.0040c470
mov byte [edi + 0x14], 0
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x18]
mov ecx, dword [esi + 4]
add eax, 0x14
mov dword [esp + 0x18], eax
lea eax, [esp + 0x2c]
push eax
push ecx
push esi
call fcn.00415530
mov ecx, dword [esp + 0x18]
jmp 0x40bcea
push 0xe4
call fcn.0081fbdc
xor esi, esi
add esp, 4
cmp eax, esi
je 0x40bb3a
fldz
mov byte [eax + 0x14], 1
fst dword [eax + 4]
mov dword [eax], vtable.CDesignNumber.0
fstp dword [eax + 8]
mov edi, eax
mov dword [eax + 0x18], vtable.CNumber.0
mov dword [eax + 0x44], esi
mov dword [eax + 0x40], vtable.CTile.0
mov dword [eax + 0x3c], esi
jmp 0x40bb3c
xor edi, edi
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 4
lea eax, [esp + 0x64]
push eax
mov ecx, ebx
call edx
mov ecx, dword [esp + 0x38]
cmp ecx, esi
je 0x40bb63
mov eax, dword [esp + 0x3c]
sub eax, ecx
sar eax, 4
cmp dword [esp + 0x60], eax
jb 0x40bb68
call fcn.0081ff70
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call edx
fild dword [esp + 0x14]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
fstp dword [edi + 0xc]
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call edx
fild dword [esp + 0x14]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
fstp dword [edi + 0x10]
lea ecx, [esp + 0x68]
push ecx
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x84]
push ecx
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x74]
push ecx
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x6c]
push ecx
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x70]
push ecx
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 4
lea ecx, [esp + 0x78]
push ecx
mov ecx, ebx
call edx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x60]
add eax, 4
test ecx, ecx
mov dword [esp + 0x18], eax
je 0x40bc1b
mov eax, dword [eax + 8]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x40bc20
call fcn.0081ff70
mov edx, dword [esp + 0x70]
fild dword [esp + 0x68]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x54], edx
fstp dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
fild dword [esp + 0x64]
mov edx, dword [edx + 4]
mov edx, dword [edx + esi*4]
mov esi, dword [esp + 0x64]
push 0
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x84]
fstp dword [edi + 0x1c]
fld dword [esp + 0x30]
push 0
mov dword [esp + 0x20], esi
fstp dword [edi + 0x20]
fld1
mov esi, dword [esp + 0x5c]
mov dword [edi + 0x34], eax
fst dword [edi + 0x28]
mov eax, dword [esp + 0x20]
fstp dword [edi + 0x24]
push eax
mov dword [edi + 0x30], ecx
mov ecx, dword [esp + 0x64]
push ecx
push 0
push 0
push edx
lea ecx, [edi + 0x40]
mov dword [edi + 0x2c], esi
mov byte [edi + 0x38], 0
call fcn.00409ce0
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x58], edi
je 0x40bcc9
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x4c]
mov dword [esp + 0x4c], eax
push edx
lea eax, [esp + 0x98]
push eax
add ecx, 0x20
push ecx
mov dword [esp + 0x5c], edi
call fcn.0040c470
mov byte [edi + 0x14], 0
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x18]
add eax, 0x14
lea edx, [esp + 0x58]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 4]
push edx
push eax
push esi
call fcn.00415530
mov ecx, dword [esp + 0x54]
mov edi, eax
call fcn.00408710
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov eax, dword [esp + 0x48]
add eax, 1
cmp eax, dword [esp + 0x44]
mov dword [esp + 0x48], eax
jb 0x40b712
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x18]
mov edx, dword [edx]
lea eax, [ecx + 0x14]
mov dword [ecx + 0x2c], eax
mov eax, dword [esp + 0x38]
xor esi, esi
cmp eax, esi
mov dword [ecx + 0x30], edx
je 0x40bd33
push eax
call fcn.0081f6fa
add esp, 4
mov dword [esp + 0x400], 0xffffffff
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov edx, dword [ebx]
mov eax, dword [edx]
push 1
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x3f8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3e0]
xor ecx, esp
call fcn.0081fb35
mov esp, ebp
pop ebp
ret 4