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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
mov eax, dword [0x63a800]
xor eax, esp
mov dword [esp + 0x90], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x1c], esi
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x80], edx
movzx edx, cl
mov dword [esp + 0x20], esi
mov esi, dword [ebp + 0x20]
or esi, dword [ebp + 0x24]
mov byte [esp + 0x13], cl
mov ecx, dword [eax + edx*4 + 0x1830]
push edi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x5c], edx
je 0x40be8d
mov ebx, edx
imul ebx, ebx, 0x68
or edx, 0xffffffff
mov dword [esp + 0x74], ebx
cmp dword [ebx + eax + 0x1ac], edx
jne 0x40bb6d
mov eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.005ac396
mov esp, ebp
pop ebp
ret 0x20
movzx eax, word [ecx + 0xb]
mov ebx, dword [ebx + 0x642c64]
cdq
mov esi, eax
mov al, byte [ecx + 0xd]
mov edi, edx
xor ecx, ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
cmp esi, ebx
jne 0x40be8d
cmp edi, ecx
jne 0x40be8d
mov ecx, esi
or ecx, edi
je 0x40be8d
test al, al
je 0x40be8d
movzx eax, al
push edi
cdq
push esi
push edx
push eax
call fcn.005af0e0
push edx
push eax
mov dword [esp + 0x74], edx
mov edx, dword [ebp + 0x1c]
mov dword [esp + 0x70], eax
mov eax, dword [ebp + 0x18]
push edx
push eax
call fcn.005bd2c0
push edi
push esi
push ebx
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ebx
call fcn.005bd2c0
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x7c], eax
mov al, byte [ebp + 0xc]
xor esi, esi
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x78], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
cmp al, 1
je 0x40bf20
cmp al, 3
jne 0x40be8d
mov ecx, dword [esp + 0x68]
push ecx
call fcn.004898a6
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, esi
je 0x40be8d
cmp dword [ebp + 0x24], esi
jb 0x40bee4
ja 0x40bc52
cmp dword [ebp + 0x20], esi
jbe 0x40bee4
cmp dword [esp + 0x7c], 0
ja 0x40be48
jb 0x40bc6a
cmp dword [esp + 0x78], 0
ja 0x40be48
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x4c]
mov cl, byte [esp + 0x17]
push edx
push eax
push edi
call fcn.0041f4f0
add eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
mov ecx, dword [edi + ecx*4 + 0x1758]
adc edx, dword [esp + 0x54]
mov ebx, dword [ecx + 0x10]
add ebx, dword [ecx + 8]
mov esi, dword [ecx + 0x14]
adc esi, dword [ecx + 0xc]
cmp edx, esi
ja 0x40bf16
jb 0x40bcb3
cmp eax, ebx
jae 0x40bf16
mov ecx, dword [esp + 0x5c]
mov ecx, dword [edi + ecx*4 + 0x1758]
mov esi, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
add esi, 1
adc ecx, 0
cmp edx, ecx
jb 0x40bf16
ja 0x40bcdc
cmp eax, esi
jb 0x40bf16
push edx
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push edx
push eax
call fcn.005af0e0
mov ecx, dword [esp + 0x74]
push 0
mov dword [esp + 0x48], edx
push 0
lea edx, [esp + 0x4c]
push edx
lea edi, [ecx + edi + 0x168]
push eax
push edi
mov dword [esp + 0x54], eax
mov dword [esp + 0x84], edi
call fcn.00444d10
add esp, 0x14
cmp eax, 0xffffffff
je 0x40bf0c
mov esi, dword [esp + 0x68]
mov eax, dword [esp + 0x10]
push esi
push 0
push eax
call fcn.005afd80
mov eax, dword [esp + 0x78]
mov ecx, dword [ebp + 0x24]
mov edx, esi
mov esi, dword [ebp + 0x20]
add esp, 0xc
sub edx, dword [esp + 0x30]
sbb eax, dword [esp + 0x34]
sub esi, dword [esp + 0x18]
sbb ecx, dword [esp + 0x1c]
cmp ecx, eax
jb 0x40bd63
ja 0x40bd5d
cmp esi, edx
jb 0x40bd63
mov esi, edx
mov edi, eax
jmp 0x40bd65
mov edi, ecx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x3c]
add eax, esi
push edx
adc ecx, edi
push ecx
push eax
call fcn.005bd2c0
or ecx, ebx
mov dword [esp + 0x94], edx
je 0x40bd8e
inc eax
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
imul edx, eax
add ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x70]
push 0
push 0
lea ecx, [esp + 0x90]
push ecx
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x50]
push ebx
push eax
push ecx
push edx
call fcn.00445150
add esp, 0x20
test eax, eax
je 0x40bf16
mov eax, 0x21
push esi
mov dword [esp + 0x64], eax
mov dword [0x642a20], eax
mov eax, dword [esp + 0x88]
push ebx
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + eax]
push ecx
mov dword [0x642a1c], 0x1000
call fcn.005ae670
add esp, 0xc
add ebx, esi
mov esi, dword [esp + 0x1c]
adc esi, edi
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
cmp ebx, eax
jne 0x40be35
cmp esi, dword [ebp + 0x24]
je 0x40c227
cmp esi, dword [ebp + 0x24]
ja 0x40bf0c
jb 0x40be48
cmp ebx, eax
ja 0x40bf0c
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x4c]
push edx
push eax
push 2
push ecx
mov cl, byte [esp + 0x27]
call fcn.0040a2e0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
test edx, edx
jne 0x40bec4
cmp eax, 0xffffff0
jb 0x40beaa
test edx, edx
jne 0x40bec4
cmp eax, 0xffffff8
jae 0x40beb5
mov eax, dword [esp + 0x10]
push eax
call fcn.0048989b
add esp, 4
or eax, 0xffffffff
or edx, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.005ac396
mov esp, ebp
pop ebp
ret 0x20
test edx, edx
jne 0x40bec4
cmp eax, 0xffffff8
jb 0x40bec4
test edx, edx
jne 0x40bec4
cmp eax, 0xfffffff
jbe 0x40c24f
mov edx, dword [ebp + 0x24]
cmp dword [esp + 0x1c], edx
jb 0x40bc52
ja 0x40bee0
mov eax, dword [ebp + 0x20]
cmp dword [esp + 0x18], eax
jb 0x40bc52
mov eax, dword [esp + 0x10]
push eax
call fcn.0048989b
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.005ac396
mov esp, ebp
pop ebp
ret 0x20
mov ecx, dword [esp + 0x10]
push ecx
jmp 0x40be85
mov edx, dword [esp + 0x10]
push edx
jmp 0x40be85
mov edx, dword [esp + 0x68]
push edx
call fcn.004898a6
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, esi
je 0x40be8d
cmp dword [ebp + 0x24], esi
jb 0x40bee4
ja 0x40bf50
cmp dword [ebp + 0x20], esi
jbe 0x40bee4
jmp 0x40bf50
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x64], eax
jb 0x40c148
ja 0x40bf6e
mov ecx, dword [esp + 0x78]
cmp dword [esp + 0x60], ecx
jb 0x40c148
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x4c]
mov cl, byte [esp + 0x17]
push edx
push eax
push edi
call fcn.0041f4f0
add eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x5c]
mov ecx, dword [edi + ecx*4 + 0x1758]
adc edx, dword [esp + 0x54]
mov ebx, dword [ecx + 0x10]
add ebx, dword [ecx + 8]
mov esi, dword [ecx + 0x14]
adc esi, dword [ecx + 0xc]
cmp edx, esi
ja 0x40bf16
jb 0x40bfb7
cmp eax, ebx
jae 0x40bf16
mov ecx, dword [esp + 0x5c]
mov ecx, dword [edi + ecx*4 + 0x1758]
mov esi, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
add esi, 1
adc ecx, 0
cmp edx, ecx
jb 0x40bf16
ja 0x40bfe0
cmp eax, esi
jb 0x40bf16
push edx
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push edx
push eax
call fcn.005af0e0
mov ecx, dword [esp + 0x74]
push 0
mov dword [esp + 0x48], edx
push 0
lea edx, [esp + 0x4c]
push edx
lea ecx, [ecx + edi + 0x168]
push eax
push ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x84], ecx
call fcn.00444d10
add esp, 0x14
cmp eax, 0xffffffff
je 0x40bf0c
mov esi, dword [esp + 0x68]
mov eax, dword [esp + 0x10]
push esi
push 0
push eax
call fcn.005afd80
mov eax, dword [esp + 0x78]
mov ecx, dword [ebp + 0x24]
mov edx, esi
mov esi, dword [ebp + 0x20]
add esp, 0xc
sub edx, dword [esp + 0x30]
sbb eax, dword [esp + 0x34]
sub esi, dword [esp + 0x18]
sbb ecx, dword [esp + 0x1c]
cmp ecx, eax
jb 0x40c067
ja 0x40c061
cmp esi, edx
jb 0x40c067
mov esi, edx
mov edi, eax
jmp 0x40c069
mov edi, ecx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x3c]
add eax, esi
push edx
adc ecx, edi
push ecx
push eax
call fcn.005bd2c0
or ecx, ebx
mov dword [esp + 0x94], edx
je 0x40c092
inc eax
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
imul edx, eax
add ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x70]
push 0
push 0
lea ecx, [esp + 0x90]
push ecx
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x50]
push ebx
push eax
push ecx
push edx
call fcn.00445150
add esp, 0x20
test eax, eax
je 0x40bf16
mov eax, dword [esp + 0x84]
push esi
push ebx
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + eax]
push ecx
mov dword [0x642a1c], 0x1000
mov dword [0x642a20], 0x20
call fcn.005ae670
add esp, 0xc
add ebx, esi
mov esi, dword [esp + 0x1c]
adc esi, edi
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
cmp ebx, eax
jne 0x40c135
cmp esi, dword [ebp + 0x24]
je 0x40c227
cmp esi, dword [ebp + 0x24]
ja 0x40bf0c
jb 0x40c148
cmp ebx, eax
ja 0x40bf0c
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x4c]
mov cl, byte [esp + 0x17]
push edx
push eax
push 0
push edi
call fcn.0040a2e0
mov ecx, eax
or ecx, edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
jne 0x40c1b4
mov ecx, dword [edi + 0x1918]
mov esi, dword [edi + 0x191c]
mov ebx, ecx
or ebx, esi
je 0x40c1d0
mov edi, dword [edi + 0x1974]
test edi, edi
je 0x40c1d0
test esi, esi
jb 0x40c1f8
ja 0x40c196
test ecx, ecx
je 0x40c1f8
add eax, 1
adc edx, 0
cmp dword [edi + eax*4], 0
je 0x40c1ac
cmp edx, esi
jb 0x40c196
ja 0x40c1ac
cmp eax, ecx
jb 0x40c196
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
test edx, edx
jne 0x40c1f8
cmp eax, 0xffffff0
jb 0x40c1e2
test edx, edx
jne 0x40c1f8
cmp eax, 0xffffff8
jb 0x40be80
jmp 0x40c1ed
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], 0
jmp 0x40c1f8
test edx, edx
jne 0x40c1f8
cmp eax, 0xffffff8
jb 0x40c1f8
test edx, edx
jne 0x40c1f8
cmp eax, 0xfffffff
jbe 0x40c24f
add dword [esp + 0x60], 1
mov edx, dword [ebp + 0x24]
adc dword [esp + 0x64], 0
cmp dword [esp + 0x1c], edx
jb 0x40bf50
ja 0x40bee0
mov eax, dword [ebp + 0x20]
cmp dword [esp + 0x18], eax
jb 0x40bf50
jmp 0x40bee0
mov eax, dword [esp + 0x10]
push eax
call fcn.0048989b
add esp, 4
mov eax, ebx
mov edx, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.005ac396
mov esp, ebp
pop ebp
ret 0x20
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0048989b
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005ac396
mov esp, ebp
pop ebp
ret 0x20