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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2f3c
call fcn.0042d1d0
push ebx
mov ebx, ecx
xor ecx, ecx
test byte [ebx + 0x44], 2
push esi
push edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
je 0x40b2c3
xor eax, eax
jmp 0x40b2c6
mov eax, dword [ebx + 0x38]
mov edi, dword [ebp + 8]
inc eax
mov dword [esp + 0x60], eax
cmp edi, ecx
jge 0x40b2f6
mov eax, dword [ebx + 0x94]
shl eax, 5
mov dword [esp + 0x24], 1
mov edi, 0x7fffffff
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x14], eax
jmp 0x40b363
mov esi, dword [ebx + 0xb0]
cmp esi, ecx
je 0x40b323
mov dword [ebx + 0xb0], ecx
push esi
xor edx, edx
mov ecx, ebx
call fcn.0040b29a
mov ecx, esi
sub ecx, eax
mov dword [ebx + 0xb0], ecx
je 0x40b323
xor eax, eax
jmp 0x40bdde
mov esi, dword [ebx + 0xb4]
mov dword [esp + 0xc], edi
test esi, esi
je 0x40b367
cmp edi, esi
jge 0x40b337
mov esi, edi
cmp dword [esp + 0x20], 0
je 0x40b355
push esi
push dword [ebx + 0xb8]
push dword [esp + 0x28]
call fcn.0042d326
add esp, 0xc
add dword [esp + 0x20], esi
sub dword [ebx + 0xb4], esi
add dword [ebx + 0xb8], esi
sub edi, esi
mov dword [esp + 0xc], edi
lea ecx, [ebx + 0x54]
call fcn.004084fa
mov ecx, dword [ebx + 0x44]
mov esi, eax
imul eax, dword [esp + 0x60]
and ecx, 1
inc ecx
shl eax, cl
cmp dword [esp + 0x24], 0
mov dword [esp + 0x18], eax
je 0x40b3bb
mov ecx, dword [ebx]
cmp dword [ecx], 0
mov eax, 0xbb8
mov edx, eax
je 0x40b3a4
mov ecx, dword [0xea9044]
cmp ecx, eax
jae 0x40b3a4
mov edx, ecx
mov eax, dword [ebx + 0x40]
imul eax, edx
xor edx, edx
div esi
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [esp + 0x24], eax
test edi, edi
jle 0x40bc4f
mov esi, dword [esp + 0x4c]
mov edi, ebx
call fcn.004086a4
test eax, eax
je 0x40bc4f
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40b3e8
mov ecx, dword [esp + 0xc]
cmp ecx, dword [esp + 0x18]
jae 0x40b3ee
lea eax, [ebx + 0xc620]
and dword [ebx + 0x48], 0
cmp dword [esp + 0x24], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x5c], eax
je 0x40b42b
mov eax, dword [ebx + 4]
sub eax, 4
cdq
mov dword [esp + 0x50], eax
mov eax, dword [ebx]
mov dword [esp + 0x54], edx
call fcn.00406233
mov ecx, eax
mov eax, dword [ebx + 0xc]
mov edi, edx
cdq
sub ecx, eax
sbb edi, edx
add dword [esp + 0x50], ecx
adc dword [esp + 0x54], edi
xor edi, edi
cmp dword [ebx + 0x5c], edi
je 0x40b436
add dword [ebx + 4], 2
mov eax, dword [ebx + 0x58]
cmp eax, 3
jne 0x40b79a
lea eax, [esp + 0xa8]
mov edx, ebx
call fcn.00409385
test eax, eax
je 0x40b78a
cmp dword [esp + 0x24], edi
je 0x40b468
cmp dword [esp + 0x14], edi
jne 0x40b4ff
lea eax, [ebx + 0x54]
call fcn.00408548
inc dword [ebx + 4]
mov esi, eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x64], eax
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x10]
cmp ecx, edx
jge 0x40b4c6
mov eax, dword [ebx + 0x14]
and eax, 0xfff
mov edi, 0x1000
sub edi, eax
cmp esi, edi
jge 0x40b49b
mov edi, esi
sub edx, ecx
cmp edi, edx
jle 0x40b4a3
mov edi, edx
push edi
lea ecx, [ecx + ebx + 0x120]
push ecx
lea eax, [eax + ebx + 0x8120]
push eax
call fcn.0042d326
add dword [ebx + 4], edi
add dword [ebx + 0x14], edi
add esp, 0xc
sub esi, edi
jne 0x40b47c
and dword [ebx + 0x1c], 0xfffffff8
jne 0x40b4d6
inc dword [ebx + 0x18]
mov dword [ebx + 0x1c], 0x20
mov eax, dword [ebx + 0x18]
lea esi, [eax + 1]
shl esi, 5
sub esi, dword [ebx + 0x1c]
shr esi, 3
mov dword [esp + 0x4c], esi
cmp eax, 0x400
jbe 0x40b4ff
add eax, 0xfffffc00
add dword [ebx + 0x14], 0xfffff000
mov dword [ebx + 0x18], eax
cmp dword [esp + 0x24], 0
jne 0x40b955
mov eax, dword [esp + 0x64]
sub eax, dword [esp + 0xa8]
sub eax, esi
js 0x40b717
xor esi, esi
cmp eax, esi
jle 0x40b52e
shl eax, 3
push eax
mov ecx, ebx
call fcn.004088c3
mov eax, dword [ebx + 0x54]
cmp eax, 2
jne 0x40b548
xor eax, eax
cmp dword [ebx + 0x64], 2
sete al
lea eax, [eax*4 + 2]
jmp 0x40b54e
imul eax, eax, 3
add eax, dword [ebx + 0x64]
imul eax, eax, 0x94
add eax, 0x4b5b58
push 0x270
mov dword [ebx + 0x7c], eax
lea eax, [esp + 0x5cc]
push esi
push eax
call fcn.0042d320
lea eax, [esp + 0xbc]
add esp, 0xc
mov dword [esp + 0x44], esi
mov dword [esp + 0x38], eax
push 0x1210
lea eax, [esp + 0xb3c]
push esi
push eax
call fcn.0042d320
lea eax, [esp + 0xb44]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x5d4]
mov dword [esp + 0x54], eax
lea eax, [esp + 0xb8]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x44]
add esp, 0xc
mov dword [ebx + 0x74], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x34], eax
mov edi, 0x8c
push dword [esp + 0x44]
mov eax, dword [ebx + 0x18]
push dword [esp + 0x14]
and eax, 0x3ff
push dword [esp + 0x34]
mov eax, dword [ebx + eax*4 + 0x8120]
push dword [esp + 0x54]
bswap eax
push ebx
mov dword [ebx + 0x20], eax
call fcn.00409426
mov edx, dword [esp + 0x34]
mov ecx, dword [edx]
sub ecx, eax
push ecx
push edx
push dword [esp + 0x50]
mov esi, ebx
push dword [esp + 0x28]
call fcn.004096b0
test eax, eax
je 0x40b708
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
add dword [esp + 0x2c], edi
add dword [esp + 0x34], edi
add dword [esp + 0x48], 0x138
mov esi, 0x908
add dword [esp + 0x1c], esi
cmp eax, dword [ebx + 0x38]
jbe 0x40b5cc
cmp dword [ebx + 0x6c], 1
jne 0x40b668
cmp dword [ebx + 0x70], 0
je 0x40b668
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x700]
push ecx
lea ecx, [esp + 0xb3c]
push ecx
add eax, 0x8c
push ebx
call fcn.00409b10
test byte [ebx + 0x44], 2
je 0x40b67f
mov ecx, 0x242
lea eax, [esp + 0xb38]
call fcn.0040b282
and dword [esp + 0x10], 0
lea eax, [esp + 0xb38]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x1d48]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
push dword [esp + 0x1c]
push dword [esp + 0x14]
push dword [esp + 0x3c]
push dword [esp + 0x38]
push ebx
call fcn.0040a810
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
add dword [esp + 0x1c], edi
add dword [esp + 0x34], 0x900
add dword [esp + 0x2c], esi
cmp eax, dword [esp + 0x60]
jl 0x40b6a2
push 0x12
push dword [esp + 0x2c]
lea edx, [esp + 0x1d50]
mov ecx, ebx
call dword [ebx + 0x50]
inc dword [esp + 0x44]
add dword [esp + 0x38], 0x44
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x54]
and eax, 1
cmp dword [esp + 0x44], eax
jg 0x40b732
xor esi, esi
jmp 0x40b581
and dword [ebx + 0x18], 0
and dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0x20
mov eax, dword [esp + 0x5c]
sub eax, dword [esp + 0x28]
add eax, dword [esp + 0x18]
push eax
push 0
push dword [esp + 0x30]
call fcn.0042d320
add esp, 0xc
lea ecx, [ebx + 0xc620]
cmp dword [esp + 0x5c], ecx
jne 0x40b76f
cmp dword [esp + 0x20], 0
je 0x40b761
mov eax, dword [esp + 0x18]
cmp dword [esp + 0xc], eax
jae 0x40b753
mov eax, dword [esp + 0xc]
push eax
push ecx
push dword [esp + 0x28]
call fcn.0042d326
add esp, 0xc
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x18]
jb 0x40bc17
cmp dword [esp + 0x20], 0
je 0x40b77e
mov eax, dword [esp + 0x18]
add dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
sub dword [esp + 0xc], eax
mov esi, dword [esp + 0x4c]
cmp dword [esp + 0xc], 0
jg 0x40b3c7
jmp 0x40bc4f
cmp eax, 1
jne 0x40b857
cmp dword [ebx + 0x6c], eax
jne 0x40b7b4
mov eax, dword [ebx + 0x70]
lea eax, [eax*8 + 8]
jmp 0x40b7bc
mov ecx, dword [ebx + 0x38]
push 0x20
pop eax
shl eax, cl
mov dword [ebx + 0x78], eax
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x6c]
push eax
mov edx, ebx
call fcn.0040ac7e
mov eax, dword [ebx + 4]
cmp eax, dword [ebx + 0x10]
jge 0x40bc4f
cmp dword [esp + 0x24], edi
jne 0x40b955
push 0xc
pop esi
mov ecx, dword [ebx + 0x38]
mov eax, 0x80
shl eax, cl
push eax
lea eax, [esp + 0x1cc]
push 0
push eax
call fcn.0042d320
add esp, 0xc
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x1d0]
mov edx, ebx
call fcn.0040ace9
test byte [ebx + 0x44], 2
je 0x40b839
push 0x20
pop ecx
lea eax, [esp + 0x1c8]
call fcn.0040b282
push 1
push dword [esp + 0x2c]
lea edx, [esp + 0x1d0]
mov ecx, ebx
call dword [ebx + 0x50]
dec esi
mov dword [esp + 0x28], eax
jne 0x40b7ec
jmp 0x40b732
cmp eax, 2
jne 0x40b78a
test byte [ebx + 0x54], 1
je 0x40b87d
mov eax, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x60]
add eax, eax
sub eax, dword [ebx + 0x38]
add eax, eax
movzx eax, byte [ecx + eax*8 + 0x4b8018]
jmp 0x40b880
push 4
pop eax
movzx edx, byte [eax + 0x4b8000]
mov ecx, dword [ebx + 0x38]
shl edx, cl
cmp dword [ebx + 0x6c], 1
mov dword [ebx + 0x74], edx
jne 0x40b8a4
mov ecx, dword [ebx + 0x70]
lea ecx, [ecx*8 + 8]
mov dword [ebx + 0x78], ecx
jmp 0x40b8a7
mov dword [ebx + 0x78], edx
cdq
sub eax, edx
lea ecx, [esp + 0x838]
push ecx
lea ecx, [esp + 0xac]
sar eax, 1
mov eax, dword [eax*4 + 0xea91b4]
push ecx
mov edx, ebx
call fcn.0040ad8c
mov eax, dword [ebx + 4]
cmp eax, dword [ebx + 0x10]
jge 0x40bc4f
cmp dword [esp + 0x24], edi
jne 0x40b955
xor esi, esi
mov ecx, dword [ebx + 0x38]
mov eax, 0x180
shl eax, cl
push eax
lea eax, [esp + 0x2cc]
push 0
push eax
call fcn.0042d320
add esp, 0xc
mov eax, esi
sar eax, 2
lea ecx, [esp + 0x2c8]
push ecx
shl eax, 8
lea eax, [esp + eax + 0x83c]
push ebx
lea ecx, [esp + 0xb0]
call fcn.0040ae70
test byte [ebx + 0x44], 2
je 0x40b934
push 0x60
pop ecx
lea eax, [esp + 0x2c8]
call fcn.0040b282
push 3
push dword [esp + 0x2c]
lea edx, [esp + 0x2d0]
mov ecx, ebx
call dword [ebx + 0x50]
inc esi
mov dword [esp + 0x28], eax
cmp esi, 0xc
jl 0x40b8de
jmp 0x40b732
xor eax, eax
cmp dword [esp + 0x14], eax
jne 0x40bb45
mov ecx, dword [ebx + 0x8120]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x5c]
mov edx, eax
neg edx
sbb edx, edx
and edx, 0x9891fe16
add edx, 0x676e6958
cmp ecx, edx
je 0x40b9a2
neg eax
sbb eax, eax
and eax, 0x909a011d
add eax, 0x6f666e49
cmp ecx, eax
jne 0x40ba21
mov dword [esp + 0x1c], 1
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx]
cdq
add dword [ecx + 0x18], eax
mov eax, 0x4090
adc dword [ecx + 0x1c], edx
sub eax, dword [ebx + 0x5c]
lea eax, [ebx + eax*2]
mov dl, byte [eax + 7]
add eax, 8
mov byte [esp + 0x33], dl
mov dword [esp + 0x10], eax
test dl, 1
je 0x40b9e1
cmp dword [ebp + 8], 0xfffffffe
jne 0x40b9da
mov ecx, dword [eax]
bswap ecx
mov dword [esp + 0x14], ecx
add eax, 4
mov dword [esp + 0x10], eax
test dl, 2
je 0x40bac3
mov edi, dword [eax]
bswap edi
test edi, edi
je 0x40baba
mov esi, dword [ebx]
call fcn.004062db
sub edi, eax
mov eax, dword [ebx]
mov eax, dword [eax + 0x18]
add edi, 0x2000
add eax, 0x4000
cmp edi, eax
jbe 0x40bab6
and dword [esp + 0x14], 0
jmp 0x40bb37
lea eax, [ebx + 0x54]
call fcn.0040851d
mov ecx, eax
mov eax, ebx
sub eax, ecx
cmp dword [eax + 0x8144], 0x49524256
jne 0x40bbba
test byte [ebx + 0x44], 8
jne 0x40ba5e
movzx ecx, byte [eax + 0x814a]
movzx edi, byte [eax + 0x814b]
shl ecx, 8
or ecx, edi
mov dword [ebx + 0xa8], ecx
mov ecx, dword [ebx + 0xa8]
cmp ecx, 0xfa0
jle 0x40ba7a
test byte [ebx + 0x54], 1
jne 0x40ba7a
sar ecx, 1
mov dword [ebx + 0xa8], ecx
add dword [ebx + 0xa8], 0xfffffdef
jns 0x40ba8d
and dword [ebx + 0xa8], 0
cmp dword [ebp + 8], 0xfffffffe
jne 0x40bbba
mov eax, dword [eax + 0x8152]
or dword [ebx + 0x80], 0xffffffff
bswap eax
mov dword [esp + 0x14], eax
mov dword [ebp + 8], 0xfffffffd
jmp 0x40bc4f
mov dl, byte [esp + 0x33]
add dword [esp + 0x10], 4
mov eax, dword [esp + 0x10]
test dl, 4
je 0x40baf6
cmp dword [esp + 0x1c], 0
jne 0x40baf3
xor esi, esi
mov cl, byte [esi + eax]
cmp cl, byte [esi + eax + 1]
ja 0x40baf3
inc esi
cmp esi, 0x63
jl 0x40bad1
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x10]
push 0x19
lea edi, [ebx + 0xbc]
pop ecx
rep movsd dword es:[edi], dword [esi]
add eax, 0x64
test dl, 8
je 0x40bafe
add eax, 4
mov eax, dword [eax + 0x14]
bswap eax
and eax, 0xffffff
test byte [ebx + 0x44], 8
jne 0x40bb2c
test eax, eax
je 0x40bb2c
mov edx, eax
shr edx, 0xc
mov ecx, 0xfff
and edx, ecx
and eax, ecx
mov dword [ebx + 0xa8], edx
mov dword [ebx + 0xac], eax
cmp dword [esp + 0x14], 0
jne 0x40bc3e
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x40], 1
jmp 0x40bbba
cmp dword [esp + 0x40], eax
je 0x40bb55
dec dword [esp + 0x14]
mov dword [esp + 0x40], eax
jmp 0x40bbba
mov eax, dword [ebx + 0x94]
lea ecx, [eax + 1]
shl ecx, 5
cmp dword [esp + 0x14], ecx
jne 0x40bbba
test al, al
jne 0x40bb84
lea eax, [eax*8 + 0x800]
push eax
push dword [ebx + 0x90]
call fcn.00401063
mov dword [ebx + 0x90], eax
mov ecx, dword [ebx + 0x94]
mov eax, dword [ebx + 0x90]
mov edx, dword [esp + 0x50]
mov dword [eax + ecx*8], edx
mov edx, dword [esp + 0x54]
mov dword [eax + ecx*8 + 4], edx
mov ecx, dword [ebp + 8]
inc dword [ebx + 0x94]
and ecx, 0x7fffffff
cmp dword [ebx + 0x94], ecx
jae 0x40bc4f
mov ecx, dword [ebx + 0x80]
mov edx, dword [ebx + 0x60]
cmp ecx, edx
je 0x40bbd4
test ecx, ecx
je 0x40bbce
or edx, 0xffffffff
mov dword [ebx + 0x80], edx
inc dword [esp + 0x14]
cmp dword [ebp + 8], 0xfffffffe
jne 0x40bc03
cmp dword [esp + 0x40], 0
jne 0x40bbf5
lea esi, [ebx + 0x54]
call fcn.004084ac
add dword [esp + 0x3c], eax
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x24]
jae 0x40bc4f
cmp dword [ebp + 8], 0xfffffffe
jl 0x40b78a
call fcn.00405764
test eax, eax
jne 0x40bc4f
jmp 0x40b78a
mov eax, dword [esp + 0xc]
lea ecx, [eax + ebx + 0xc620]
mov dword [ebx + 0xb8], ecx
mov ecx, dword [esp + 0x18]
sub ecx, eax
and dword [esp + 0xc], 0
mov dword [ebx + 0xb4], ecx
jmp 0x40bd61
cmp dword [esp + 0x1c], 0
jne 0x40bc4c
or dword [ebx + 0x80], 0xffffffff
dec dword [ebp + 8]
xor ecx, ecx
cmp dword [esp + 0x24], ecx
je 0x40bd5b
cmp dword [ebp + 8], 0xfffffffd
jl 0x40bca3
mov eax, dword [ebx + 0x44]
test al, 2
jne 0x40bc6b
mov ecx, dword [ebx + 0x38]
and eax, 1
cmp dword [ebx + 0x58], 3
lea ecx, [eax + ecx + 1]
jne 0x40bc97
mov edx, dword [ebx + 0xac]
mov edi, 0x211
add dword [ebx + 0xa8], edi
cmp edx, edi
jg 0x40bc8f
mov edi, edx
sub edx, edi
mov dword [ebx + 0xac], edx
shl dword [ebx + 0xa8], cl
shl dword [ebx + 0xac], cl
cmp dword [ebp + 8], 0xfffffffe
jne 0x40bce0
cmp dword [esp + 0x14], 1
jbe 0x40bce0
mov esi, dword [ebx]
call fcn.004062db
push 0
push dword [esp + 0x18]
push edx
push eax
call fcn.0042d160
mov ecx, dword [esp + 0x3c]
xor esi, esi
push esi
push dword [esp + 0x40]
shr ecx, 1
add eax, ecx
adc edx, esi
push edx
push eax
call fcn.0042d200
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x98], eax
mul dword [esp + 0x14]
mov esi, eax
mov eax, dword [ebx + 0xac]
add eax, dword [ebx + 0xa8]
mov ecx, edx
cdq
cmp edx, ecx
ja 0x40bd09
jb 0x40bd0d
cmp eax, esi
jb 0x40bd0d
mov eax, esi
mov edx, ecx
sub esi, eax
sbb ecx, edx
cmp dword [ebx + 0xa4], ecx
jb 0x40bd2d
ja 0x40bd23
cmp dword [ebx + 0xa0], esi
jb 0x40bd2d
cmp dword [ebx + 0xc], 0
jne 0x40b31c
cmp dword [ebx + 0xc], 0
mov dword [ebx + 0xa0], esi
mov dword [ebx + 0xa4], ecx
jne 0x40b31c
mov eax, dword [ebx]
call fcn.00406233
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], edx
jmp 0x40b31c
cmp dword [esp + 0xc], ecx
jne 0x40bd80
mov edi, ebx
call fcn.004086a4
test eax, eax
je 0x40bd80
mov eax, dword [ebx + 0x10]
cmp eax, dword [ebx + 0xc]
jne 0x40bdd7
mov eax, dword [esp + 0x18]
cmp dword [ebx + 0xac], eax
jbe 0x40bdd7
mov eax, dword [ebx + 0xac]
xor edx, edx
div dword [esp + 0x18]
cmp dword [ebx + 0xb4], edx
ja 0x40bdd7
push dword [ebx]
call fcn.0040627e
test eax, eax
je 0x40bdd7
cmp dword [ebx + 0x48], 0
je 0x40bdb3
mov eax, dword [ebx + 0xac]
xor edx, edx
div dword [esp + 0x18]
jmp 0x40bdb9
mov edx, dword [ebx + 0xac]
sub edx, dword [ebx + 0xb4]
mov eax, dword [ebp + 8]
add dword [esp + 0xc], edx
cmp dword [esp + 0xc], eax
jle 0x40bdd0
mov dword [esp + 0xc], eax
and dword [ebx + 0xb4], 0
mov eax, dword [ebp + 8]
sub eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4