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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xdc
push ebx
push esi
mov ebx, eax
push edi
mov edi, dword [ebp + 0x18]
mov esi, ebx
shl esi, 2
lea eax, [edi + 0x30]
mov dword [esp + 0x14], esi
call fcn.0040bba5
mov esi, dword [eax + esi]
lea eax, [edi + 8]
call fcn.0040bba5
lea eax, [eax + esi*8]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x78]
call fcn.0040b8bb
lea esi, [esp + 0x78]
mov eax, edi
call fcn.0040aa15
mov eax, esi
call fcn.0040a98d
test al, al
jne 0x40aff0
call fcn.0040b8c7
mov eax, 0x80004001
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x30
lea eax, [esp + 0x98]
call fcn.0040ade1
lea eax, [esp + 0x98]
lea ecx, [esp + 0x78]
call fcn.0040ab02
lea eax, [esp + 0x98]
call fcn.0040fcb3
test al, al
jne 0x40b03a
mov edi, 0x80004001
lea eax, [esp + 0x98]
call fcn.0040adf5
lea esi, [esp + 0x78]
call fcn.0040b8c7
mov eax, edi
jmp 0x40afe7
call fcn.0040aa31
mov ecx, dword [ebp + 0x1c]
mov byte [esp + 0x1c], 1
test ecx, ecx
je 0x40b073
mov esi, dword [ecx]
mov ecx, dword [ecx + 4]
cmp ecx, edx
jb 0x40b061
ja 0x40b05a
cmp esi, eax
jbe 0x40b063
mov edi, 0x80004005
jmp 0x40b021
cmp esi, eax
jne 0x40b06e
mov byte [esp + 0x1c], 1
cmp ecx, edx
je 0x40b073
mov byte [esp + 0x1c], 0
mov esi, dword [ebp + 8]
cmp byte [esi], 0
je 0x40b094
lea eax, [esi + 4]
push eax
lea eax, [esp + 0x9c]
call fcn.0040ac50
pop ecx
test al, al
jne 0x40b1a9
mov ebx, esi
lea esi, [ebx + 0x5c]
call fcn.0040d199
push 0x84
call fcn.0041d28e
pop ecx
test eax, eax
je 0x40b0b6
mov esi, eax
call fcn.0040a8ec
jmp 0x40b0b8
xor eax, eax
mov edi, eax
lea esi, [ebx + 0x5c]
mov dword [ebx + 0x54], eax
call fcn.004032b1
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x40b0d1
lea ecx, [eax + 4]
jmp 0x40b0d3
xor ecx, ecx
lea edx, [esp + 0x98]
mov dword [ebx + 0x58], ecx
mov eax, dword [ecx]
push edx
call dword [eax]
test eax, eax
je 0x40b0ed
mov edi, eax
jmp 0x40b021
and dword [esp + 0x10], 0
lea eax, [esp + 0x78]
call fcn.0040ba95
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40b194
lea eax, [esp + 0x78]
call fcn.0040bba5
mov edi, eax
lea esi, [esp + 0x68]
call fcn.0040b8cc
push dword [edi + 4]
mov ebx, esi
push dword [edi]
call fcn.00410af9
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x40b211
mov ecx, edi
call fcn.0040a969
test al, al
je 0x40b149
mov ecx, esi
call fcn.00411d5c
test al, al
jmp 0x40b161
lea ecx, [esp + 0x6c]
call fcn.00411d5c
test al, al
jne 0x40b221
mov eax, dword [esp + 0x74]
cmp eax, dword [edi + 0x10]
jne 0x40b221
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x58]
mov eax, dword [ecx]
lea edx, [esp + 0x68]
push edx
call dword [eax + 4]
lea esi, [esp + 0x68]
call fcn.0040b8de
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
add edi, 0x18
cmp eax, dword [esp + 0x2c]
jb 0x40b112
mov ebx, dword [ebp + 8]
lea ecx, [ebx + 4]
lea eax, [esp + 0x98]
call fcn.0040b8ed
mov esi, dword [ebp + 8]
mov byte [ebx], 1
mov ecx, dword [esi + 0x58]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov eax, dword [ebp + 0x18]
and dword [esp + 0x24], 0
add eax, 0x2c
call fcn.0040bba5
mov ecx, dword [esp + 0x14]
mov edi, dword [eax + ecx]
and dword [esp + 0x30], 0
lea eax, [esp + 0x78]
mov dword [esp + 0x3c], edi
call fcn.0040ba95
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40b56a
lea eax, [esp + 0x34]
call fcn.0040c6c1
mov dword [esp + 0x94], eax
mov eax, edi
shl eax, 3
mov dword [esp + 0x54], eax
lea eax, [esp + 0x78]
call fcn.0040bba5
lea edi, [eax + 8]
mov dword [esp + 0x10], edi
jmp 0x40b233
lea esi, [esp + 0x68]
call fcn.0040b8de
mov edi, ebx
jmp 0x40b021
lea esi, [esp + 0x68]
call fcn.0040b8de
jmp 0x40b01c
mov edi, dword [esp + 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x58]
push dword [esp + 0x30]
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, eax
call fcn.0040a6fb
mov ebx, eax
lea eax, [esp + 0x34]
mov dword [esp + 0x44], ebx
call fcn.0040d189
push dword [esp + 0x94]
mov eax, dword [ebx]
push 0x42932c
push ebx
call dword [eax]
lea eax, [esp + 0x34]
call fcn.0040bba5
test eax, eax
je 0x40b2be
mov eax, edi
call fcn.0040ba95
mov dword [esp + 0x58], eax
cmp eax, 0xffffffff
lea eax, [esp + 0x34]
ja 0x40b5a9
call fcn.0040bba5
push dword [esp + 0x58]
mov esi, eax
mov eax, edi
call fcn.0040bba5
push eax
mov eax, dword [esi]
push esi
call dword [eax + 0xc]
mov edi, eax
cmp edi, 0x80070057
jne 0x40b2b6
mov edi, 0x80004001
test edi, edi
jne 0x40b5b3
lea eax, [esp + 0x34]
call fcn.0040c6b4
lea eax, [esp + 0x28]
call fcn.0040d189
mov esi, dword [ebx]
lea eax, [esp + 0x28]
call fcn.0040c6c1
push eax
push 0x4293dc
push ebx
call dword [esi]
lea eax, [esp + 0x28]
call fcn.0040bba5
test eax, eax
je 0x40b3d3
mov esi, dword [ebp + 0x28]
mov eax, dword [ebp + 0x2c]
mov byte [eax], 1
test esi, esi
je 0x40b5c1
lea eax, [esp + 0x38]
call fcn.0040d189
mov edi, dword [esi]
lea eax, [esp + 0x38]
call fcn.0040c6c1
push eax
push esi
call dword [edi + 0xc]
mov edi, eax
test edi, edi
jne 0x40b5cf
mov eax, dword [ebp + 0x30]
mov esi, dword [ebp + 0x34]
mov byte [eax], 1
mov eax, esi
call fcn.004025ef
lea eax, [esp + 0x38]
xor ebx, ebx
call fcn.0040bba5
test eax, eax
je 0x40b357
push eax
call fcn.004125ee
mov eax, esi
call fcn.0040ba95
mov ebx, eax
lea edi, [ebx + ebx]
lea esi, [esp + 0x48]
call fcn.0040b984
xor edi, edi
test ebx, ebx
je 0x40b38e
mov eax, esi
call fcn.0040bba5
mov esi, eax
lea eax, [esp + 0x38]
call fcn.0040bba5
movzx eax, word [eax + edi*2]
mov byte [esi + edi*2], al
shr eax, 8
mov byte [esi + edi*2 + 1], al
inc edi
cmp edi, ebx
jb 0x40b372
lea eax, [esp + 0x28]
call fcn.0040bba5
mov esi, eax
mov edi, dword [esi]
lea eax, [esp + 0x48]
call fcn.0040ba95
push eax
lea eax, [esp + 0x4c]
call fcn.0040bba5
push eax
push esi
call dword [edi + 0xc]
mov edi, eax
lea eax, [esp + 0x48]
call fcn.0040bbea
test edi, edi
jne 0x40b5cf
lea eax, [esp + 0x38]
call fcn.0040bce0
mov ebx, dword [esp + 0x44]
lea eax, [esp + 0x28]
call fcn.0040c6b4
lea eax, [esp + 0x40]
call fcn.0040d189
mov esi, dword [ebx]
lea eax, [esp + 0x40]
call fcn.0040c6c1
push eax
push 0x42934c
push ebx
call dword [esi]
lea eax, [esp + 0x40]
call fcn.0040bba5
test eax, eax
je 0x40b42c
lea eax, [esp + 0x40]
call fcn.0040bba5
push dword [esp + 0x1c]
mov esi, eax
mov edi, dword [esi]
call fcn.0040bcd3
pop ecx
push eax
push esi
call dword [edi + 0xc]
mov edi, eax
test edi, edi
jne 0x40b5e6
lea eax, [esp + 0x40]
call fcn.0040c6b4
mov eax, dword [esp + 0x10]
mov edi, dword [eax + 8]
mov eax, edi
lea esi, [esp + 0x14]
mov dword [esp + 0x44], edi
call fcn.0040bba8
mov eax, edi
lea esi, [esp + 0x18]
call fcn.0040bbc9
xor ebx, ebx
test edi, edi
je 0x40b4f8
push dword [esp + 0x24]
lea eax, [esp + 0x7c]
call fcn.0040a9d8
mov esi, eax
test esi, esi
js 0x40b4a5
mov eax, dword [ebp + 0x18]
add eax, 0x28
call fcn.0040bba5
mov edi, eax
lea eax, [esp + 0x80]
call fcn.0040bba5
mov eax, dword [eax + esi*8 + 4]
add eax, dword [esp + 0x3c]
lea esi, [edi + eax*8]
lea eax, [esp + 0x18]
call fcn.0040bba5
mov dword [eax + ebx*4], esi
jmp 0x40b4e9
push dword [esp + 0x24]
lea eax, [esp + 0x7c]
call fcn.0040a99b
test eax, eax
js 0x40b5f4
mov ecx, dword [esp + 0x20]
lea esi, [ecx + eax*8]
lea eax, [esp + 0x14]
call fcn.0040bba5
mov ecx, dword [esi + 0xc]
lea edi, [eax + ebx*8]
mov eax, dword [esi + 8]
sub eax, dword [esi]
sbb ecx, dword [esi + 4]
mov dword [edi], eax
lea eax, [esp + 0x18]
mov dword [edi + 4], ecx
call fcn.0040bba5
mov dword [eax + ebx*4], edi
inc ebx
inc dword [esp + 0x24]
cmp ebx, dword [esp + 0x44]
jb 0x40b460
mov edi, dword [ebp + 0x1c]
test edi, edi
je 0x40b50c
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0xbc]
je 0x40b51d
mov eax, dword [ebp + 0x18]
add eax, 0x28
call fcn.0040bba5
mov edi, eax
add edi, dword [esp + 0x54]
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x58]
mov ebx, dword [esi]
lea eax, [esp + 0x18]
call fcn.0040bba5
push eax
push edi
push dword [esp + 0x38]
mov ecx, esi
call dword [ebx + 0x14]
lea eax, [esp + 0x18]
call fcn.0040bbea
lea eax, [esp + 0x14]
call fcn.0040bbea
inc dword [esp + 0x30]
mov eax, dword [esp + 0x30]
add dword [esp + 0x54], 8
add dword [esp + 0x10], 0x18
cmp eax, dword [esp + 0x2c]
jb 0x40b22f
mov esi, dword [ebp + 8]
cmp dword [ebp + 0x20], 0
je 0x40b584
cmp byte [esp + 0x1c], 0
mov ecx, dword [esi + 0x58]
mov eax, dword [ecx]
sete dl
movzx edx, dl
push edx
call dword [eax + 0xc]
lea eax, [esp + 0x5c]
push eax
call fcn.0040f6a6
push 0x30
call fcn.0041d28e
pop ecx
test eax, eax
je 0x40b60b
mov esi, eax
call fcn.0040b90b
mov ebx, eax
mov dword [esp + 0x14], ebx
jmp 0x40b614
call fcn.0040c6b4
jmp 0x40b01c
lea eax, [esp + 0x34]
call fcn.0040c6b4
jmp 0x40b021
lea eax, [esp + 0x28]
call fcn.0040c6b4
jmp 0x40b01c
lea eax, [esp + 0x38]
call fcn.0040bce0
lea eax, [esp + 0x28]
call fcn.0040c6b4
jmp 0x40b021
lea eax, [esp + 0x40]
call fcn.0040c6b4
jmp 0x40b021
lea eax, [esp + 0x18]
call fcn.0040bbea
lea eax, [esp + 0x14]
call fcn.0040bbea
jmp 0x40b01c
and dword [esp + 0x14], 0
mov ebx, dword [esp + 0x14]
mov eax, ebx
lea esi, [esp + 0x24]
call fcn.0040ba0b
lea eax, [esp + 0x88]
call fcn.0040ba95
mov dword [esp + 0x2c], eax
cmp eax, 1
jbe 0x40b67c
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
add edx, dword [ebp + 0x10]
mov eax, dword [eax + 4]
adc eax, dword [ebp + 0x14]
push 0
push eax
push edx
push edi
call dword [ecx + 0x10]
mov esi, eax
test esi, esi
je 0x40b674
lea eax, [esp + 0x24]
call fcn.0040c6b4
lea eax, [esp + 0x5c]
push eax
call fcn.0040bac6
mov edi, esi
jmp 0x40b021
lea esi, [ebx + 8]
call fcn.004032b1
and dword [esp + 0x10], 0
cmp dword [esp + 0x2c], 0
jbe 0x40b7a4
lea ecx, [esp + 0x18]
call fcn.0040b99a
mov ebx, dword [esp + 0x10]
shl ebx, 3
mov dword [esp + 0x44], ebx
add ebx, dword [esp + 0x20]
mov eax, dword [ebx]
add eax, dword [ebp + 0x10]
mov ecx, dword [ebx + 4]
adc ecx, dword [ebp + 0x14]
cmp dword [esp + 0x2c], 1
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
jne 0x40b6e9
mov edx, dword [ebp + 0xc]
mov esi, dword [edx]
push 0
push 0
push ecx
push eax
push edx
call dword [esi + 0x10]
mov edi, eax
test edi, edi
jne 0x40b825
mov edi, dword [ebp + 0xc]
lea esi, [esp + 0x18]
call fcn.004032b1
jmp 0x40b722
push 0x20
call fcn.0041d28e
pop ecx
test eax, eax
je 0x40b700
mov esi, eax
call fcn.0040b92d
mov edi, eax
jmp 0x40b702
xor edi, edi
lea esi, [esp + 0x18]
call fcn.004032b1
push dword [esp + 0x4c]
mov eax, dword [esp + 0x18]
push dword [esp + 0x4c]
mov ebx, edi
call fcn.0040ae7b
mov ebx, dword [esp + 0x3c]
push 0x28
call fcn.0041d28e
pop ecx
test eax, eax
je 0x40b73b
mov esi, eax
call fcn.0040b94d
mov dword [esp + 0x1c], eax
jmp 0x40b740
and dword [esp + 0x1c], 0
lea eax, [esp + 0x5c]
push eax
call fcn.0040ba99
mov edi, dword [esp + 0x1c]
mov esi, eax
call fcn.004032b1
lea eax, [esp + 0x18]
call fcn.0040bba5
mov edi, eax
mov eax, dword [esp + 0x1c]
call fcn.0040a5b5
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
mov edx, dword [eax + ecx + 8]
sub edx, dword [ebx]
mov eax, dword [eax + ecx + 0xc]
sbb eax, dword [ebx + 4]
push eax
mov eax, dword [esp + 0x20]
push edx
call fcn.0040a5c0
lea ecx, [esp + 0x18]
call fcn.0040b9a0
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x2c]
jb 0x40b68c
lea eax, [esp + 0x5c]
call fcn.00414fb8
lea esi, [esp + 0x20]
mov edi, eax
call fcn.0040bbc9
xor esi, esi
test edi, edi
je 0x40b7e1
lea eax, [esp + 0x20]
call fcn.0040bba5
mov ebx, eax
mov ecx, esi
lea eax, [esp + 0x5c]
call fcn.00410791
call fcn.0040bba5
mov dword [ebx + esi*4], eax
inc esi
cmp esi, edi
jb 0x40b7c9
mov ebx, dword [ebp + 0x20]
test ebx, ebx
je 0x40b89a
lea eax, [esp + 0x14]
call fcn.0040d189
cmp dword [ebp + 0x24], 0
je 0x40b853
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x58]
push dword [ecx + 0x60]
call fcn.0040fe7d
test al, al
jne 0x40b853
push 0xc
call fcn.0041d28e
pop ecx
test eax, eax
je 0x40b846
push dword [ebp + 0x24]
mov edi, eax
call fcn.0040aa76
jmp 0x40b848
lea ecx, [esp + 0x18]
call fcn.0040b9a0
lea eax, [esp + 0x24]
call fcn.0040c6b4
lea eax, [esp + 0x5c]
push eax
call fcn.0040bac6
jmp 0x40b021
xor eax, eax
mov edi, eax
lea esi, [esp + 0x14]
call fcn.004032b1
lea eax, [esp + 0x14]
mov dword [esp + 0x3c], ebx
call fcn.0040bba5
test eax, eax
jne 0x40b867
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 0x58]
mov edi, dword [esi]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x28]
call fcn.0040bba5
push eax
mov ecx, esi
call dword [edi + 0x18]
mov edi, eax
lea eax, [esp + 0x14]
call fcn.0040c6b4
lea eax, [esp + 0x20]
call fcn.0040bbea
jmp 0x40b82e
lea eax, [esp + 0x20]
call fcn.0040bbea
lea eax, [esp + 0x24]
call fcn.0040c6b4
lea eax, [esp + 0x5c]
push eax
call fcn.0040bac6
jmp 0x40b05a