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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x10c
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x128]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x12c]
mov esi, dword [esp + 0x120]
mov edi, dword [esp + 0x124]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x3c]
mov eax, dword [eax + 0x1c]
mov edx, dword [eax + edx*4]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x38], edx
mov ebx, dword [eax + 0x4e0]
test ebx, ebx
je 0x40c592
mov edx, esi
lea eax, [edi - 0x80000000]
or edx, eax
je 0x40c310
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0xcc]
add eax, 0x80000000
or eax, dword [edx + 0xc8]
jne 0x40c310
mov eax, dword [edx + 0xd0]
mov edx, dword [edx + 0xd4]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x2c]
add eax, 0x80000000
or eax, dword [esp + 0x28]
je 0x40c310
cmp edi, 0x7ffdffff
jg 0x40c310
mov ecx, dword [esp + 0x38]
mov eax, esi
mov edx, edi
sub eax, dword [esp + 0x28]
sbb edx, dword [esp + 0x2c]
mov dword [esp + 0x78], 0
mov ecx, dword [ecx + 8]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x38]
add dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x28]
adc dword [esp + 0x2c], 0x7ffeffff
mov ebp, dword [ecx + 0xb0]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0xc8], edx
add edx, 1
mov dword [eax + 0xd0], esi
mov dword [eax + 0xd4], edi
mov dword [eax + 0xcc], ecx
adc ecx, 0x80010000
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x7c], 0x80000000
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0x80000000
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0x80000000
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0x80000000
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0x80000000
mov dword [esp + 0xa0], 0
cmp dword [esp + 0x54], 0x7ffdffff
mov dword [esp + 0xa4], 0x80000000
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0x80000000
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], 0x80000000
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0x80000000
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0x80000000
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0x80000000
mov dword [esp + 0xd0], 0
mov dword [esp + 0xd4], 0x80000000
mov dword [esp + 0xd8], 0
mov dword [esp + 0xdc], 0x80000000
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0x80000000
mov dword [esp + 0xe8], 0
mov dword [esp + 0xec], 0x80000000
mov dword [esp + 0xf0], 0
mov dword [esp + 0xf4], 0x80000000
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0x80000000
jg 0x40c546
test ebx, ebx
je 0x40c330
mov edx, dword [esp + 0x3c]
cmp edx, dword [ebx + 0x20]
je 0x40bfd8
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x40c320
mov ebx, eax
mov edx, dword [esp + 0x3c]
cmp edx, dword [ebx + 0x20]
jne 0x40bfc2
mov edi, dword [ebx + 0xc]
mov esi, dword [ebx + 8]
cmp edi, 0x7ffdffff
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
jle 0x40c00c
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
add dword [esp + 0x28], eax
adc dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov dword [ebx + 0xc], ecx
mov dword [ebx + 8], edx
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 0x10]
cmp edx, 0x7ffdffff
jle 0x40c028
add eax, dword [esp + 0x30]
adc edx, dword [esp + 0x34]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0x34]
add eax, 0x80000000
or eax, dword [esi + 0x30]
je 0x40c520
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
add edx, 0x80000000
or eax, edx
je 0x40bfc2
cmp ebp, 0x10
jg 0x40bfc2
mov edi, dword [esp + 0x40]
cmp dword [edi + 0x30], 0x1c
je 0x40c553
mov eax, dword [esp + 0x28]
test ebp, ebp
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edx
jle 0x40c0f2
mov esi, dword [esp + 0x84]
mov edi, dword [esp + 0x80]
cmp edx, esi
jl 0x40c0f2
jg 0x40c096
cmp eax, edi
jbe 0x40c0f2
xor ecx, ecx
mov eax, 1
mov dword [esp + 0x58], ecx
jmp 0x40c0af
cmp dword [esp + 0x28], edi
jbe 0x40c0f2
mov dword [esp + 0x58], eax
mov eax, edx
mov ecx, dword [esp + 0x2c]
cmp eax, ebp
mov edx, dword [esp + 0x28]
mov dword [esp + eax*8 + 0x7c], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + eax*8 + 0x78], edx
mov dword [esp + ecx*8 + 0x78], edi
mov dword [esp + ecx*8 + 0x7c], esi
je 0x40c0f2
mov esi, dword [esp + eax*8 + 0x78]
lea edx, [eax + 1]
mov edi, dword [esp + eax*8 + 0x7c]
mov dword [esp + 0x28], esi
mov esi, dword [esp + edx*8 + 0x7c]
mov dword [esp + 0x2c], edi
mov edi, dword [esp + edx*8 + 0x78]
cmp dword [esp + 0x2c], esi
jg 0x40c0a9
jge 0x40c0a3
mov eax, dword [ebx + 0x14]
add eax, 0x80000000
or eax, dword [ebx + 0x10]
jne 0x40bfc2
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
jmp 0x40bfc2
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0x1d8]
cmp eax, 0xffffffff
jne 0x40c2f1
mov edi, dword [esp + 0x38]
mov ebx, dword [edi + 0x1d4]
mov ebp, dword [edi + 0x1d0]
lea eax, [ebx - 0x80000000]
or eax, ebp
setne byte [esp + 0x28]
je 0x40c766
cmp dword [esp + 0x64], ebx
jl 0x40c178
jg 0x40c15a
cmp dword [esp + 0x60], ebp
jb 0x40c178
movzx ecx, byte [esp + 0x5c]
xor eax, eax
xor edx, edx
test cl, 0x20
sete al
setne dl
shl edx, cl
shl eax, cl
sub dword [esp + 0x60], eax
sbb dword [esp + 0x64], edx
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov dword [eax + 0xc8], esi
mov esi, dword [eax + 0xd0]
mov dword [eax + 0xcc], edi
mov edi, dword [eax + 0xd4]
mov edx, esi
lea eax, [edi - 0x80000000]
or edx, eax
je 0x40c1d3
cmp byte [esp + 0x28], 0
je 0x40c1d3
cmp edi, ebx
jl 0x40c1d3
jg 0x40c1b9
cmp esi, ebp
jb 0x40c1d3
movzx ecx, byte [esp + 0x5c]
xor eax, eax
xor edx, edx
test cl, 0x20
sete al
setne dl
shl eax, cl
shl edx, cl
sub esi, eax
sbb edi, edx
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x134]
mov dword [eax + 0xd0], esi
mov dword [eax + 0xd4], edi
mov edi, dword [edx + 4]
mov esi, dword [edx]
lea eax, [edi - 0x80000000]
mov edx, esi
or edx, eax
je 0x40c22c
cmp byte [esp + 0x28], 0
je 0x40c22c
cmp edi, ebx
jl 0x40c22c
jg 0x40c212
cmp esi, ebp
lea esi, [esi]
jb 0x40c22c
movzx ecx, byte [esp + 0x5c]
xor eax, eax
xor edx, edx
test cl, 0x20
sete al
setne dl
shl eax, cl
shl edx, cl
sub esi, eax
sbb edi, edx
mov ebx, dword [esp + 0x134]
mov eax, dword [esp + 0x38]
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov ebx, dword [esp + 0x130]
mov ecx, dword [eax + 0x1d4]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
mov ebx, dword [eax + 0x1d0]
mov edx, esi
lea eax, [edi - 0x80000000]
or edx, eax
je 0x40c28e
lea eax, [ecx - 0x80000000]
or eax, ebx
je 0x40c28e
cmp edi, ecx
jl 0x40c28e
jg 0x40c274
cmp esi, ebx
jb 0x40c28e
movzx ecx, byte [esp + 0x5c]
xor eax, eax
xor edx, edx
test cl, 0x20
sete al
setne dl
shl eax, cl
shl edx, cl
sub esi, eax
sbb edi, edx
mov ebx, dword [esp + 0x130]
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
mov dword [ebx], esi
mov esi, dword [esp + 0x38]
add eax, 0x80000000
or edx, eax
mov dword [ebx + 4], edi
mov ecx, dword [esi + 0x1d0]
mov ebx, dword [esi + 0x1d4]
je 0x40c2f1
lea eax, [ebx - 0x80000000]
or eax, ecx
je 0x40c2f1
cmp dword [esp + 0x54], ebx
jl 0x40c2f1
jg 0x40c2d3
cmp dword [esp + 0x50], ecx
jb 0x40c2f1
movzx ecx, byte [esp + 0x5c]
xor eax, eax
xor edx, edx
test cl, 0x20
sete al
setne dl
shl edx, cl
shl eax, cl
sub dword [esp + 0x50], eax
sbb dword [esp + 0x54], edx
mov ebx, dword [esp + 0x38]
mov eax, dword [ebx + 0x34]
add eax, 0x80000000
or eax, dword [ebx + 0x30]
jne 0x40c310
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x34], edi
add esp, 0x10c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x48]
cmp ebx, dword [eax + 0x4e4]
je 0x40c5a0
mov eax, dword [esp + 0x48]
mov esi, dword [eax + 0x4b8]
test esi, esi
je 0x40c2f1
mov ebx, dword [esp + 0x38]
mov ebx, dword [ebx + 0xbc]
cmp ebx, 0x3e
mov dword [esp + 0x5c], ebx
jg 0x40c2f1
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0x1d4]
add eax, 0x80000000
or eax, dword [esi + 0x1d0]
jne 0x40c2f1
mov ebx, dword [esi + 0xc8]
mov esi, dword [esi + 0xcc]
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], esi
mov eax, dword [esp + 0x64]
add eax, 0x80000000
or eax, ebx
je 0x40c2f1
mov edi, dword [esp + 0x38]
mov eax, dword [edi + 0x28]
mov edx, eax
sar edx, 0x1f
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [edi + 0x2c]
mov dword [esp], 0x3c
mov dword [esp + 4], 0
mov ecx, eax
sar ecx, 0x1f
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
call fcn.0053b060
movzx ecx, byte [esp + 0x5c]
mov esi, eax
mov eax, dword [esp + 0x60]
mov edi, edx
mov edx, dword [esp + 0x64]
sub eax, esi
sbb edx, edi
mov dword [esp + 0x40], eax
xor eax, eax
mov dword [esp + 0x44], edx
xor edx, edx
test cl, 0x20
sete al
setne dl
shl edx, cl
shl eax, cl
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x2c], edx
xor edx, edx
mov ebx, dword [esp + 0x2c]
sub ecx, 3
test cl, 0x20
sete al
setne dl
shl edx, cl
shl eax, cl
mov ecx, dword [esp + 0x28]
sub ecx, eax
sbb ebx, edx
cmp dword [esp + 0x64], ebx
jl 0x40c5d5
jg 0x40c435
cmp dword [esp + 0x60], ecx
jb 0x40c5d5
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
sub eax, esi
sbb edx, edi
cmp dword [esp + 0x64], edx
jl 0x40c5d5
jg 0x40c457
cmp dword [esp + 0x60], eax
jb 0x40c5d5
mov dword [esp + 0x58], 0xffffffff
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x450]
test eax, eax
mov dword [esp + 0x30], eax
je 0x40c4cc
mov eax, dword [esp + 0x48]
xor edx, edx
mov ebx, dword [esp + 0x3c]
mov eax, dword [eax + 0x454]
mov dword [esp + 0x28], eax
mov esi, dword [esp + 0x28]
xor eax, eax
nop
lea esi, [esi]
mov edi, dword [esi + eax*4]
test edi, edi
je 0x40c4c1
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x40c4c1
mov ebp, dword [edi + 0xc]
cmp ebx, dword [ebp]
je 0x40c5e2
xor eax, eax
jmp 0x40c4ba
cmp ebx, dword [ebp + eax*4]
je 0x40c5e2
add eax, 1
cmp eax, ecx
jne 0x40c4b0
add edx, 1
cmp edx, dword [esp + 0x30]
mov eax, edx
jne 0x40c490
mov eax, dword [esp + 0x48]
mov ebx, dword [eax + 0x18]
mov eax, 0xfffffffc
test ebx, ebx
je 0x40c797
xor eax, eax
mov esi, 0xffffffff
mov edi, dword [esp + 0x4c]
xor edx, edx
jmp 0x40c4fc
add edx, 1
cmp edx, ebx
mov eax, edx
je 0x40c78d
mov ecx, dword [edi + eax*4]
mov eax, dword [ecx + 8]
mov eax, dword [eax + 8]
test eax, eax
jne 0x40c513
test byte [ecx + 0x49], 4
je 0x40c81e
cmp esi, 0xffffffff
jne 0x40c4ef
cmp eax, 1
cmove esi, edx
jmp 0x40c4ef
mov eax, dword [esp + 0x2c]
add eax, 0x80000000
or eax, dword [esp + 0x28]
je 0x40bfc2
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
jmp 0x40c03d
add dword [esp + 0x50], edx
adc dword [esp + 0x54], ecx
jmp 0x40bfb1
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0xb8]
test eax, eax
je 0x40c06a
mov eax, dword [edi + 0xb0]
cmp eax, 2
jle 0x40c5b5
cmp eax, 3
je 0x40c5c3
mov esi, dword [esp + 0x38]
xor eax, eax
cmp dword [esi + 0x1c4], 0x13
setg al
test eax, eax
je 0x40bfc2
jmp 0x40c06a
mov ebx, dword [eax + 0x4c8]
jmp 0x40bd6e
mov eax, dword [eax + 0x4c8]
test eax, eax
je 0x40c330
mov ebx, eax
jmp 0x40bfcf
xor eax, eax
cmp dword [esi + 0x1c4], 6
setg al
jmp 0x40c585
mov edi, dword [esp + 0x38]
xor eax, eax
cmp dword [edi + 0x1c4], 0x11
setg al
jmp 0x40c585
mov dword [esp + 0x58], 1
jmp 0x40c45f
mov edx, dword [edi + 0x3c]
mov esi, edi
mov dword [esp + 0x48], ecx
mov ecx, dword [edi + 0x38]
lea eax, [edx - 0x80000000]
or eax, ecx
jne 0x40c684
mov dword [esp + 0x6c], ebp
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x68], edi
mov ebx, esi
xor eax, eax
xor ecx, ecx
jmp 0x40c61f
test ebx, ebx
je 0x40c650
add ecx, 1
cmp dword [esp + 0x30], ecx
mov eax, ecx
je 0x40c637
mov edx, dword [esp + 0x28]
mov esi, dword [edx + eax*4]
cmp esi, ebx
jne 0x40c610
add ecx, 1
xor ebx, ebx
cmp dword [esp + 0x30], ecx
mov eax, ecx
jne 0x40c61f
mov esi, ebp
mov edi, dword [esp + 0x68]
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x6c]
mov eax, dword [esp + 0x44]
jmp 0x40c6a0
mov edi, dword [esi + 0x10]
test edi, edi
je 0x40c614
mov eax, dword [esi + 0xc]
cmp ebp, dword [eax]
je 0x40c66c
xor edx, edx
add edx, 1
cmp edx, edi
je 0x40c614
cmp ebp, dword [eax + edx*4]
jne 0x40c660
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x38]
lea eax, [edx - 0x80000000]
or eax, ecx
je 0x40c608
mov edi, dword [esp + 0x68]
mov ebp, dword [esp + 0x6c]
mov esi, dword [esi + 0x40]
mov eax, edx
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x58], esi
mov esi, dword [esp + 0x3c]
lea esi, [esi]
mov edx, dword [esp + 0x40]
xor eax, dword [edi + 0x3c]
xor edx, dword [edi + 0x38]
or eax, edx
je 0x40c70b
mov ecx, dword [esp + 0x4c]
xor eax, eax
xor edx, edx
mov dword [esp + 0x48], edi
mov dword [esp + 0x3c], esi
nop
mov eax, dword [ebp + eax*4]
add edx, 1
mov edi, dword [esp + 0x44]
cmp edx, ebx
mov esi, dword [esp + 0x40]
mov eax, dword [ecx + eax*4]
mov dword [eax + 0x1d4], edi
mov edi, dword [esp + 0x58]
mov dword [eax + 0x1d0], esi
mov dword [eax + 0x1d8], edi
mov eax, edx
jne 0x40c6c0
mov edi, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
mov dword [edi + 0x3c], edx
mov edx, dword [esp + 0x58]
mov dword [edi + 0x38], eax
mov dword [edi + 0x40], edx
mov ecx, edi
xor eax, eax
xor edx, edx
jmp 0x40c726
test ecx, ecx
je 0x40c735
add edx, 1
cmp dword [esp + 0x30], edx
mov eax, edx
je 0x40c116
mov ebx, dword [esp + 0x28]
mov edi, dword [ebx + eax*4]
cmp edi, ecx
jne 0x40c713
xor ecx, ecx
jmp 0x40c717
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x40c717
mov ebp, dword [edi + 0xc]
cmp esi, dword [ebp]
je 0x40c645
xor eax, eax
lea esi, [esi]
add eax, 1
cmp eax, ebx
je 0x40c717
cmp esi, dword [ebp + eax*4]
jne 0x40c750
mov eax, dword [esp + 0x44]
jmp 0x40c6a0
mov eax, edi
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov dword [eax + 0xc8], esi
mov esi, dword [eax + 0xd0]
mov dword [eax + 0xcc], edi
mov edi, dword [eax + 0xd4]
jmp 0x40c1d3
xor eax, eax
test esi, esi
cmovns eax, esi
shl eax, 2
mov esi, dword [esp + 0x4c]
mov eax, dword [esi + eax]
mov esi, dword [eax + 0x1d4]
mov edx, dword [eax + 0x1d0]
lea ecx, [esi - 0x80000000]
or ecx, edx
je 0x40c7d5
mov edi, dword [esp + 0x38]
mov eax, dword [eax + 0x1d8]
mov dword [edi + 0x1d0], edx
mov dword [edi + 0x1d4], esi
mov dword [edi + 0x1d8], eax
jmp 0x40c120
test ebx, ebx
je 0x40c116
xor eax, eax
xor edx, edx
mov edi, dword [esp + 0x4c]
add edx, 1
mov esi, dword [esp + 0x40]
cmp edx, ebx
mov eax, dword [edi + eax*4]
mov edi, dword [esp + 0x44]
mov dword [eax + 0x1d0], esi
mov dword [eax + 0x1d4], edi
mov edi, dword [esp + 0x58]
mov dword [eax + 0x1d8], edi
mov eax, edx
jne 0x40c7e1
mov ebx, dword [esp + 0x38]
mov eax, dword [ebx + 0x1d8]
jmp 0x40c120
lea eax, [edx*4]
jmp 0x40c797