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

Disassembly:
sub esp, 0xc0
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, dword [esp + 0xd4]
push esi
mov eax, dword [edi + 4]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x6c], edx
mov edx, dword [edi]
mov eax, dword [ecx + 0x10]
mov ecx, edi
mov dword [esp + 0x70], eax
call dword [edx + 0x14]
lea ecx, [esp + 0x5c]
mov ebx, eax
mov eax, dword [edi]
push esi
push ecx
mov ecx, edi
mov dword [esp + 0x50], ebx
call dword [eax + 0x1c]
mov eax, dword [edi + 4]
push esi
add eax, 4
lea ecx, [eax + 0xc]
call fcn.00403b80
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x88], edx
mov edx, dword [edi + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov eax, dword [edx + 8]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
push ecx
push edx
push eax
push 0x20
lea edx, [esp + 0x30]
lea ecx, [esp + 0x80]
call fcn.004070b0
mov eax, dword [edi + 4]
push esi
add eax, 4
lea ecx, [eax + 0xc]
call fcn.00403b80
mov eax, dword [eax]
mov ebp, dword [esp + 0x74]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
sub ebp, eax
mov eax, dword [edi]
mov dword [esp + 0x74], ebp
lea ebp, [edx + ecx]
lea ecx, [esp + 0xa4]
push esi
neg ebp
push ecx
mov ecx, edi
mov dword [esp + 0x48], ebp
call dword [eax + 0x1c]
mov edx, dword [eax + 4]
lea ecx, [esp + 0x10]
push edx
mov eax, dword [eax]
push eax
push ecx
mov ecx, edi
call fcn.00405bf0
mov eax, dword [edi + 4]
push esi
add eax, 4
lea ecx, [eax + 0xc]
call fcn.00403b80
mov eax, dword [eax]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
sub ecx, eax
push edx
mov dword [esp + 0x18], ecx
mov ecx, edi
call fcn.00405ab0
mov eax, dword [edi]
push esi
mov ecx, edi
call dword [eax + 0x14]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ecx
push edx
push 0xffffff01
push 0
lea ecx, [esp + 0xa4]
mov esi, eax
call fcn.00406fc0
mov edx, dword [esi]
push eax
lea eax, [esp + 0x14]
mov ecx, esi
push eax
lea eax, [esp + 0x54]
push eax
call dword [edx + 0x44]
mov edx, eax
lea ecx, [esp + 0xb8]
call fcn.00407020
mov edx, eax
lea ecx, [esp + 0x2c]
call fcn.00407060
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
add ecx, 0x1f
sar ecx, 5
add edx, 0x1f
push ecx
mov ecx, dword [esp + 0x2c]
sar edx, 5
sar eax, 5
push edx
push eax
sar ecx, 5
push ecx
lea ecx, [esp + 0x88]
call fcn.00406fc0
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x84]
cmp eax, ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
jge 0x406caf
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x78]
cmp eax, ecx
mov dword [esp + 0x10], eax
jge 0x406c8f
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x64]
lea ecx, [edi + 4]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
call fcn.00409a20
lea ecx, [eax + 8]
call fcn.00409b20
mov ecx, dword [esp + 0xd4]
mov eax, dword [eax + 4]
mov dword [esp + 0x18], ecx
mov ecx, esi
lea edx, [esp + 0x20]
shl ecx, 4
push edx
add ecx, eax
call fcn.00404060
mov esi, dword [eax + 8]
lea ebx, [eax + 8]
add esi, 4
lea eax, [esp + 0x18]
push 0
push eax
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
call fcn.0040a9c0
mov ebp, eax
mov eax, dword [esi + 8]
cmp ebp, eax
je 0x406c51
mov ecx, dword [ebp]
mov eax, dword [esp + 0x18]
cmp ecx, eax
je 0x406c73
mov esi, dword [esi + 4]
mov ecx, ebx
call fcn.004099b0
mov ecx, dword [eax + 4]
sub ebp, esi
lea edx, [esp + 0x18]
sar ebp, 2
push edx
lea edx, [ecx + ebp*4]
mov ecx, eax
push edx
call fcn.00407920
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x80]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x406bdf
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x84]
inc edx
cmp edx, esi
mov dword [esp + 0x14], edx
jl 0x406bd3
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x40]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x48]
mov esi, eax
test esi, esi
jle 0x406fab
jmp 0x406cca
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x18]
mov edx, dword [ebx]
dec esi
push esi
mov ecx, ebx
mov dword [esp + 0x1c], esi
call dword [edx + 0x4c]
add eax, ebp
push esi
mov dword [esp + 0x40], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x6c]
mov edx, dword [ebx]
mov byte [esp + 0x1f], al
lea eax, [esp + 0xc0]
push esi
push eax
mov ecx, ebx
call dword [edx + 0x54]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x4c], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x50], edx
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x70]
mov dword [esp + 0x54], ecx
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x5c], edx
call fcn.00406fe0
mov eax, dword [esp + 0x58]
mov ebp, dword [esp + 0x6c]
cmp eax, ebp
jge 0x406d30
mov ebp, eax
mov esi, dword [esp + 0x54]
mov eax, dword [esp + 0x68]
cmp esi, eax
jl 0x406d3e
mov esi, eax
mov ecx, dword [esp + 0x50]
cmp ecx, 0xffffff01
jg 0x406d4f
mov ecx, 0xffffff01
mov eax, dword [esp + 0x4c]
xor edx, edx
test eax, eax
setle dl
dec edx
push ebp
and eax, edx
push esi
push ecx
push eax
lea ecx, [esp + 0xa4]
call fcn.00406fc0
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x98]
add eax, 0x1f
sar eax, 5
add ecx, 0x1f
push eax
mov eax, dword [esp + 0x98]
sar ecx, 5
sar edx, 5
push ecx
push edx
sar eax, 5
push eax
lea ecx, [esp + 0x38]
call fcn.00406fc0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
cmp eax, ecx
mov dword [esp + 0x14], eax
jge 0x406f9f
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov edx, ecx
cmp ecx, eax
mov dword [esp + 0x10], edx
jge 0x406f8a
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x64]
mov dword [esp + 0x90], ecx
lea ecx, [edi + 4]
mov dword [esp + 0x8c], edx
call fcn.00409a20
lea ecx, [eax + 8]
call fcn.00409b20
mov eax, dword [eax + 4]
mov ecx, esi
lea edx, [esp + 0x8c]
shl ecx, 4
push edx
add ecx, eax
call fcn.00404060
lea esi, [eax + 4]
mov ecx, esi
mov dword [esp + 0x38], esi
call fcn.004099d0
mov ebp, dword [eax + 8]
mov al, byte [esp + 0x1f]
test al, al
mov ecx, esi
je 0x406e6a
call fcn.004099d0
cmp ebp, dword [eax + 4]
je 0x406f31
mov eax, dword [ebp - 8]
mov edx, dword [edi]
mov ebx, dword [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x14]
mov edx, dword [eax]
push ebx
mov ecx, eax
call dword [edx + 0x6c]
test al, al
jne 0x406f31
mov ecx, esi
add ebp, 0xfffffff8
call fcn.004099d0
cmp ebp, dword [eax + 4]
jne 0x406e38
jmp 0x406f31
call fcn.004099d0
cmp ebp, dword [eax + 4]
je 0x406f31
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov edx, dword [edi]
push esi
mov ecx, edi
mov dword [esp + 0x48], eax
call dword [edx + 0x14]
mov ecx, dword [esp + 0x44]
mov ebx, eax
push ecx
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x6c]
test al, al
jne 0x406f2d
mov edx, dword [edi]
lea eax, [esp + 0xb0]
push esi
push eax
mov ecx, edi
call dword [edx + 0x1c]
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x44]
mov edx, dword [eax + 4]
mov eax, dword [ebx]
push ecx
mov ecx, ebx
mov dword [esp + 0x28], edx
call dword [eax + 0x4c]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
sub eax, ebx
sub eax, edx
cmp ecx, eax
jl 0x406f2d
cmp ecx, eax
jne 0x406f18
mov eax, dword [edi + 4]
mov edx, esi
sar edx, 0xc
mov ecx, dword [eax + 0x14]
and esi, 0xfff
mov eax, dword [ecx + 8]
mov ecx, esi
sar ecx, 6
lea eax, [eax + edx*4]
and esi, 0x3f
mov edx, dword [eax]
mov eax, dword [edx + 8]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esp + 0x88]
mov edx, dword [ecx + 8]
cmp eax, dword [edx + esi*8 + 4]
ja 0x406f2d
mov ecx, dword [esp + 0x38]
add ebp, 0xfffffff8
call fcn.004099d0
cmp ebp, dword [eax + 4]
jne 0x406e78
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0xd4]
mov edx, dword [esp + 0x18]
mov eax, dword [esi]
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xa8], edx
cmp dword [eax], 1
jbe 0x406f58
mov ecx, esi
call fcn.0040a2d0
lea ecx, [esp + 0xa4]
push ecx
mov ecx, dword [esi]
push 1
push ebp
add ecx, 4
call fcn.005df630
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
inc edx
cmp edx, eax
mov dword [esp + 0x10], edx
jl 0x406dd2
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x48]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x34]
inc edx
cmp edx, esi
mov dword [esp + 0x14], edx
jl 0x406dc4
mov eax, dword [esp + 0x18]
test eax, eax
jg 0x406cc2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret 4