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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xb0]
mov ebx, dword [esp + 0xa8]
mov ebp, dword [esp + 0xa0]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x28], ebx
mov edi, dword [esp + 0xac]
mov dword [esp + 0x44], eax
lea eax, [ecx + ecx]
cmp eax, ebx
jg 0x40af00
sub ebx, 1
mov edx, 0xaaaaaaab
mov eax, ebx
mul edx
shr edx, 2
lea ebx, [edx + 1]
lea esi, [ebx*4]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], ebp
lea eax, [esi + ebx]
mov dword [esp + 0x18], 2
sub edx, eax
shl eax, 2
mov dword [esp + 0x10], ebx
mov dword [esp + 0x40], edx
lea edx, [ebx + ebx]
sub ecx, edx
mov dword [esp + 0x30], edx
add edx, ebx
mov dword [esp + 0x34], ecx
lea ecx, [edx*4]
mov dword [esp + 0x28], edx
lea edx, [ebp + ecx]
mov dword [esp + 0x4c], ecx
mov ecx, edx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x68], eax
lea eax, [ebp + eax + 8]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 4], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], 5
mov dword [esp], eax
call fcn.00410440
mov dword [esp + 8], ebx
lea edx, [ebp + esi]
mov dword [esp + 0x70], eax
lea eax, [edi + esi]
mov dword [esp + 0xc], 2
mov dword [esp + 4], eax
mov dword [esp], ebp
mov dword [esp + 0x74], edx
mov dword [esp + 0x48], eax
call fcn.00419080
lea edx, [ebp + esi]
add esi, dword [esp + 0x48]
mov dword [edx], eax
mov edx, dword [esp + 0x28]
mov ecx, esi
mov dword [esp + 0x60], esi
lea eax, [edx*8]
mov dword [esp + 4], ecx
lea esi, [ebp + eax + 0xc]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x34]
mov dword [esp + 0xc], 4
lea eax, [esi + edx*2 + 3]
mov dword [esp + 8], esi
lea edx, [ebp + eax*4]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.00419080
imul ecx, ebx, 0x1c
mov edx, dword [esp + 0x64]
mov dword [edx], eax
mov eax, dword [esp + 0x44]
mov edx, esi
lea esi, [esi + 1]
mov dword [esp + 0x78], ecx
lea ecx, [ebp + ecx + 0xc]
mov dword [esp + 0x5c], ecx
mov ecx, ebx
shl ecx, 4
lea ecx, [ebp + ecx + 4]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x4c]
lea ecx, [eax + ecx + 4]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x30]
add ecx, 1
mov dword [esp + 0x58], ecx
mov ecx, eax
mov eax, dword [esp + 0x6c]
lea eax, [ecx + eax + 8]
mov dword [esp + 0x4c], eax
cmp ebx, edx
je 0x40b028
test esi, esi
jne 0x40af80
xor eax, eax
cmp dword [esp + 0x28], edi
je 0x40b1d8
mov ecx, dword [esp + 0x28]
nop
mov edx, dword [edi + eax*4]
mov dword [ecx + eax*4], edx
add eax, 1
cmp ebx, eax
jg 0x40aaf0
xor eax, eax
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x28]
mov dword [ecx], eax
lea eax, [ebx + 1]
mov ecx, ebp
mov dword [esp], eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
call fcn.0040a890
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x3c]
mov dword [esp], ebp
xor ecx, eax
mov dword [esp + 8], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
call fcn.00405090
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp], eax
call fcn.00405090
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 4
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x14], 2
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 8], ebp
mov dword [esp], ecx
call fcn.0040f880
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 8], 5
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040fda0
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x40b2af
mov ecx, dword [esp + 0x4c]
xor eax, eax
cmp edi, dword [esp + 0x4c]
je 0x40abfd
mov edx, dword [edi + eax*4]
mov dword [ecx + eax*4], edx
add eax, 1
cmp ebx, eax
jg 0x40abf0
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 8], eax
mov dword [esp], ecx
call fcn.004041a0
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x7c], esi
mov dword [ecx], eax
mov ecx, dword [esp + 0x44]
lea eax, [ebx - 1]
mov ebx, dword [esp + 0x48]
add ecx, edx
mov esi, ecx
nop
mov ecx, dword [esi + eax*4 + 8]
mov edx, dword [ebx + eax*4]
cmp ecx, edx
jne 0x40af50
sub eax, 1
jae 0x40ac40
mov eax, dword [esp + 0x68]
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x7c], 0
lea eax, [ebp + eax + 4]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00404250
mov edx, dword [esp + 0x7c]
sub edx, eax
mov eax, dword [esp + 0x6c]
mov dword [eax], edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
mov dword [esp], ebp
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
call fcn.00405090
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00405090
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 8], ebp
call fcn.0040f880
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x50]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 5
call fcn.004100c0
mov ecx, dword [esp + 0x48]
mov dword [esp + 0xc], 1
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], ebp
mov dword [esp + 0x6c], eax
call fcn.00419080
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x60]
mov dword [ecx], eax
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov dword [esp + 4], edx
mov dword [esp + 0xc], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.00419080
mov edx, dword [esp + 0x64]
mov dword [edx], eax
cmp ebx, dword [esp + 0x34]
je 0x40b178
test esi, esi
jne 0x40afd8
cmp dword [esp + 0x28], edi
je 0x40adc5
mov edx, dword [esp + 0x28]
lea esi, [esi]
mov eax, dword [edi + esi*4]
mov dword [edx + esi*4], eax
add esi, 1
cmp ebx, esi
jg 0x40adb8
xor eax, eax
mov esi, dword [esp + 0x5c]
mov dword [esi], eax
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
mov ecx, ebp
mov dword [esp], eax
mov eax, dword [esp + 0x3c]
call fcn.0040a890
mov esi, dword [esp + 0x6c]
mov ecx, dword [esp + 0x30]
mov dword [esp], ebp
xor esi, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
call fcn.00405090
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 4], ecx
call fcn.00405090
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x58]
mov dword [esp + 0x18], 2
mov dword [esp], eax
mov dword [esp + 4], esi
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], ebx
mov dword [esp + 8], ebp
call fcn.0040f880
mov dword [esp + 8], edi
mov edi, dword [esp + 0x50]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edi
mov dword [esp], ebp
call fcn.00405090
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x78]
mov esi, dword [esp + 0x34]
add edx, edi
mov edi, dword [esp + 0x40]
add eax, ebp
cmp edi, esi
jle 0x40af20
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x60]
mov dword [esp + 8], edi
mov dword [esp + 0xc], esi
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00404360
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x34]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xa8], eax
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004118c0
lea ebx, [ecx - 1]
mov edx, 0xaaaaaaab
mov eax, ebx
mul edx
shr edx, 1
lea ebx, [edx + 1]
jmp 0x40a97d
mov edi, dword [esp + 0x40]
mov dword [esp + 0xc], edx
mov dword [esp], eax
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x34]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x60]
mov dword [esp + 4], edi
call fcn.00404360
jmp 0x40aead
mov eax, dword [esp + 0x68]
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x7c]
lea eax, [ebp + eax + 4]
mov dword [esp + 0x6c], eax
jbe 0x40b1a0
mov dword [esp + 0x7c], 0
jmp 0x40ac70
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], eax
call fcn.004041a0
test eax, eax
mov eax, esi
je 0x40b330
mov ecx, dword [esp + 0x28]
jmp 0x40afc3
mov edx, dword [edi + eax*4]
add eax, 1
add edx, 1
mov dword [ecx + eax*4 - 4], edx
jne 0x40b330
cmp ebx, eax
jg 0x40afb0
mov eax, 1
jmp 0x40aaff
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], eax
call fcn.004041a0
test eax, eax
je 0x40b310
mov edx, dword [esp + 0x28]
jmp 0x40b013
mov eax, dword [edi + esi*4]
add esi, 1
add eax, 1
mov dword [edx + esi*4 - 4], eax
jne 0x40b310
cmp ebx, esi
jg 0x40b000
mov eax, 1
jmp 0x40adc7
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.004041a0
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x28]
add dword [ecx], eax
mov eax, dword [esp + 0x3c]
mov ecx, ebp
mov dword [esp], esi
call fcn.0040a890
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x70]
mov dword [esp], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov edx, dword [esp + 0x2c]
xor ecx, eax
mov dword [esp + 0x30], ecx
mov dword [esp + 4], edx
call fcn.00405090
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp], eax
call fcn.00405090
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 4
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x14], 2
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 8], ebp
mov dword [esp], ecx
call fcn.0040f880
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 5
mov dword [esp], eax
call fcn.0040fda0
mov dword [esp + 0xc], ebx
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call fcn.004041a0
mov dword [esp + 0x30], esi
test eax, eax
je 0x40abfd
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.004041a0
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x7c], 1
add eax, 1
mov dword [ecx], eax
mov eax, dword [esp + 0x68]
lea eax, [ebp + eax + 4]
mov dword [esp + 0x6c], eax
jmp 0x40ac70
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.004041a0
mov esi, dword [esp + 0x5c]
add dword [esi], eax
jmp 0x40adcd
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00404250
mov eax, dword [esp + 0x6c]
not dword [esp + 0x70]
mov dword [eax], 0
jmp 0x40ac9c
mov eax, dword [esp + 0x5c]
mov ecx, ebp
mov edx, edi
mov dword [eax], 0
lea eax, [ebx + 1]
mov dword [esp], eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
call fcn.0040a890
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x30]
mov dword [esp], ebp
xor edx, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x70], edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
call fcn.00405090
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x54]
mov dword [esp + 8], edi
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00405090
mov edx, dword [esp + 0x70]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 4
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x14], 2
mov dword [esp + 4], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], ebp
mov dword [esp], edx
call fcn.0040f880
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 8], 5
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0040fda0
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x60]
mov dword [esp + 4], edi
mov edx, dword [esp + 0x4c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp], edx
call fcn.004041a0
test eax, eax
mov eax, dword [esp + 0x34]
je 0x40b2f7
mov ecx, dword [esp + 0x4c]
lea esi, [esi]
nop
cmp ebx, eax
jle 0x40b132
mov edx, dword [edi + eax*4]
add eax, 1
add edx, 1
mov dword [ecx + eax*4 - 4], edx
je 0x40b2e0
mov ecx, dword [esp + 0x4c]
cmp edi, ecx
jne 0x40abf9
jmp 0x40abfd
cmp dword [esp + 0x28], edi
je 0x40adc5
cmp ebx, esi
jg 0x40adb0
jmp 0x40adc5
cmp dword [esp + 0x28], edi
je 0x40aafd
cmp ebx, eax
jg 0x40aaea
jmp 0x40aafd