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

Disassembly:
push 0x3c
mov eax, 0x100f7496
call 0x4f60b6
mov esi, ecx
call fcn.00407750
lea eax, [ebp - 0x34]
xor ebx, ebx
lea edi, [esi + 0xa8]
push eax
mov ecx, edi
mov word [ebp - 0x34], 0x3f
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
call fcn.004047a0
test eax, eax
je 0x40b004
mov ecx, esi
call fcn.00407750
movzx ecx, word [edi]
movzx eax, cx
cmp eax, 0x3d
push 0x3e
pop edx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], edx
jg 0x40a9cb
je 0x40a983
sub eax, 0x21
je 0x40a97c
sub eax, 6
je 0x40a708
dec eax
je 0x40a790
sub eax, 0x14
jne 0x40a9e4
movzx eax, word [esi + 0xb8]
cmp eax, 0x21
je 0x40a721
cmp eax, 0x3d
je 0x40a728
cmp word [edi], 0x50
jne 0x40a708
mov ecx, esi
call fcn.00407750
movzx eax, word [edi]
cmp ax, 0x3c
jne 0x40adda
mov dword [ebp - 0x1c], 0x3e
jmp 0x40ade7
mov dword [ebp - 0x14], 1
mov ecx, esi
call fcn.00407750
mov ecx, esi
call fcn.00407750
push 0xc
call 0x4f62c0
mov ebx, eax
pop ecx
mov dword [ebp - 0x24], ebx
test ebx, ebx
mov dword [ebp - 4], 1
je 0x40a774
mov eax, dword [ebp + 8]
mov eax, dword [eax]
or eax, 0x10
push eax
mov ecx, esi
call fcn.0040a57b
mov dword [ebx + 4], eax
xor eax, eax
cmp dword [ebp - 0x14], eax
mov dword [ebx], 0x1011cda8
sete al
mov dword [ebx + 8], eax
jmp 0x40a776
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
push ebx
lea ecx, [esi + 0x14]
call fcn.00404fd5
test ebx, ebx
je 0x40a6fb
jmp 0x40aff1
push 0x28
call 0x4f62c0
test eax, eax
pop ecx
je 0x40a7aa
mov ecx, eax
call fcn.00404fbc
mov ebx, eax
mov dword [ebp - 0x14], eax
jmp 0x40a7af
xor ebx, ebx
mov dword [ebp - 0x14], ebx
lea ecx, [esi + 0x14]
push ebx
call fcn.00404fd5
and dword [ebp - 0x2c], 0
and dword [ebp - 0x28], 0
lea eax, [ebp - 0x34]
push eax
lea ecx, [esi + 0xb8]
mov word [ebp - 0x34], 0x3f
mov dword [ebp - 0x30], 1
call fcn.004047a0
test eax, eax
mov ecx, esi
je 0x40a7f2
push dword [ebp + 8]
call fcn.0040a666
mov dword [ebx + 0x1c], eax
jmp 0x40a93c
call fcn.00407750
mov ebx, dword [esi + 0xb0]
push 0xc
call 0x4f62c0
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
mov dword [ebp - 4], 6
je 0x40a837
mov eax, dword [ebp + 8]
push dword [eax]
mov ecx, esi
call fcn.0040a57b
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], 0x1011cda8
mov dword [ecx + 4], eax
mov dword [ecx + 8], 1
mov dword [ebp - 0x1c], ecx
jmp 0x40a83b
and dword [ebp - 0x1c], 0
push dword [ebp - 0x1c]
lea ecx, [esi + 0x14]
call fcn.00404fd5
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi + 0xb0]
push 1
sub eax, ebx
lea ecx, [esi + 0x8c]
push eax
call fcn.0040487c
mov ecx, dword [ebp - 0x14]
lea eax, [eax + ebx*2]
push eax
add ecx, 8
call fcn.00404da3
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], 0x1011cd14
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], eax
cmp ebx, dword [esi + 0xb0]
mov dword [ebp - 4], 7
jge 0x40a8de
push ebx
lea ecx, [esi + 0x8c]
call fcn.00404865
movzx eax, ax
mov cl, al
push 1
push 1
and cx, 0xff
cmp cx, ax
setne cl
dec cl
and ecx, eax
lea eax, [ebp - 0x10]
mov byte [ebp - 0x10], cl
push eax
lea ecx, [ebp - 0x48]
call fcn.004049ce
inc ebx
cmp ebx, dword [esi + 0xb0]
jl 0x40a898
mov eax, dword [ebp - 0x3c]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x40a8e5
mov dword [ebp - 0x1c], 0x10130a9c
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004048cf
test eax, eax
pop ecx
pop ecx
je 0x40a904
mov ecx, dword [ebp - 0x1c]
xor eax, eax
cmp byte [ecx], al
sete al
jmp 0x40a906
xor eax, eax
test eax, eax
mov eax, dword [ebp - 0x14]
je 0x40a919
mov ecx, dword [ebp - 0x18]
mov dword [eax + 4], ecx
and dword [eax + 0x1c], 0
jmp 0x40a926
or dword [eax + 4], 0xffffffff
push eax
lea ecx, [esi + 0x78]
call fcn.00404fd5
mov ecx, esi
call fcn.00407750
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.0040495e
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
call fcn.00409cb5
mov dword [ebx + 0x20], eax
cmp word [edi], 0x7c
jne 0x40a973
mov ecx, esi
call fcn.00407750
mov eax, dword [ebp + 8]
push dword [eax]
mov ecx, esi
call fcn.0040a57b
mov dword [ebx + 0x24], eax
jmp 0x40aff1
and dword [ebx + 0x24], 0
jmp 0x40aff1
mov dword [ebp - 0x14], 1
mov ecx, esi
call fcn.00407750
push 0xc
call 0x4f62c0
mov edi, eax
pop ecx
mov dword [ebp - 0x24], edi
cmp edi, ebx
mov dword [ebp - 4], ebx
je 0x40afe0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
and eax, 0xffffffef
push eax
mov ecx, esi
call fcn.0040a57b
mov dword [edi + 4], eax
xor eax, eax
cmp dword [ebp - 0x14], ebx
mov dword [edi], 0x1011cda8
sete al
mov dword [edi + 8], eax
jmp 0x40afe2
sub eax, edx
je 0x40afaa
sub eax, 0x12
je 0x40a6fb
dec eax
dec eax
je 0x40abf2
xor ebx, ebx
cmp cx, bx
je 0x40aa06
movzx eax, word [edi]
push eax
call dword [0x1010964c]
test eax, eax
pop ecx
je 0x40aa06
mov ecx, esi
call fcn.00407750
cmp word [edi], bx
jne 0x40a9eb
movzx eax, word [edi]
cmp ax, 0x30
jb 0x40aac1
cmp ax, 0x39
ja 0x40aac1
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x48], 0x1011cd14
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], ebx
cmp ax, bx
mov dword [ebp - 4], 8
je 0x40aa78
movzx eax, word [edi]
cmp ax, 0x29
je 0x40aa78
mov cl, al
and cx, 0xff
cmp cx, ax
jne 0x40aa58
mov al, byte [edi]
mov byte [ebp + 8], al
jmp 0x40aa5c
mov byte [ebp + 8], 0
push 1
push 1
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x48]
call fcn.004049ce
mov ecx, esi
call fcn.00407750
cmp word [edi], bx
jne 0x40aa3c
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], eax
jne 0x40aa8c
mov dword [ebp - 0x1c], 0x10130a9c
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004048cf
push 0x20
call 0x4f62c0
add esp, 0xc
cmp eax, ebx
je 0x40aab3
push dword [ebp - 0x18]
mov ecx, eax
call fcn.00404f74
mov ebx, eax
push ebx
lea ecx, [esi + 0x14]
call fcn.00404fd5
jmp 0x40adcc
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
jmp 0x40ab6f
movzx eax, word [edi]
cmp ax, 0x3a
je 0x40ab93
cmp ax, 0x29
je 0x40ab93
lea eax, [ebp - 0x44]
push eax
mov ecx, edi
mov word [ebp - 0x44], 0x28
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call fcn.004047a0
test eax, eax
jne 0x40ab93
movzx eax, word [edi]
movzx eax, ax
xor ecx, ecx
cmp eax, 0x53
jg 0x40ab3a
je 0x40ab4d
sub eax, 0x2d
je 0x40ab31
sub eax, 0x1a
je 0x40ab56
dec eax
dec eax
je 0x40ab52
sub eax, 4
jne 0x40ab59
push 2
jmp 0x40ab58
mov dword [ebp - 0x14], 1
jmp 0x40ab5e
sub eax, 0x67
je 0x40ab56
dec eax
dec eax
je 0x40ab52
sub eax, 4
je 0x40ab2d
sub eax, 6
jne 0x40ab59
xor ecx, ecx
inc ecx
jmp 0x40ab59
push 8
jmp 0x40ab58
push 4
pop ecx
cmp dword [ebp - 0x14], ebx
je 0x40ab65
not ecx
and dword [ebp - 0x18], ecx
jmp 0x40ab68
or dword [ebp - 0x18], ecx
mov ecx, esi
call fcn.00407750
lea eax, [ebp - 0x34]
push eax
mov ecx, edi
mov word [ebp - 0x34], bx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
call fcn.004047a0
test eax, eax
je 0x40aace
movzx eax, word [edi]
cmp ax, 0x3a
mov dword [ebp - 0x1c], eax
je 0x40abd3
lea eax, [ebp - 0x44]
push eax
mov ecx, edi
mov word [ebp - 0x44], 0x28
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call fcn.004047a0
test eax, eax
jne 0x40abd3
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
push ebx
mov ecx, esi
call fcn.00407790
jmp 0x40abeb
cmp word [ebp - 0x1c], 0x3a
jne 0x40abe1
mov ecx, esi
call fcn.00407750
push dword [ebp - 0x18]
mov ecx, esi
call fcn.0040a57b
mov ebx, eax
jmp 0x40aff1
mov ecx, esi
call fcn.00407750
xor ebx, ebx
jmp 0x40ac13
movzx eax, word [edi]
push eax
call dword [0x1010964c]
test eax, eax
pop ecx
je 0x40ac18
mov ecx, esi
call fcn.00407750
cmp word [edi], bx
jne 0x40abfd
movzx eax, word [edi]
cmp ax, 0x3c
je 0x40acc5
cmp ax, 0x27
je 0x40acc5
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x48], 0x1011cd14
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], ebx
cmp ax, bx
mov dword [ebp - 4], 5
je 0x40ac8a
movzx eax, word [edi]
cmp ax, 0x29
je 0x40ac8a
mov cl, al
and cx, 0xff
cmp cx, ax
jne 0x40ac6a
mov al, byte [edi]
mov byte [ebp + 8], al
jmp 0x40ac6e
mov byte [ebp + 8], 0
push 1
push 1
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x48]
call fcn.004049ce
mov ecx, esi
call fcn.00407750
cmp word [edi], bx
jne 0x40ac4e
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp + 8], eax
jne 0x40ac9e
mov dword [ebp + 8], 0x10130a9c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
call fcn.004048cf
push 0x20
call 0x4f62c0
add esp, 0xc
cmp eax, ebx
je 0x40aab3
push dword [ebp - 0x1c]
jmp 0x40aaaa
xor ecx, ecx
cmp ax, 0x3c
setne cl
push 0x20
dec ecx
and ecx, 0x17
add ecx, 0x27
movzx eax, cx
mov dword [ebp - 0x1c], eax
call 0x4f62c0
cmp eax, ebx
pop ecx
je 0x40acf5
push 0xfffffffffffffffd
mov ecx, eax
call fcn.00404f74
mov dword [ebp - 0x18], eax
jmp 0x40acf8
mov dword [ebp - 0x18], ebx
push dword [ebp - 0x18]
lea ecx, [esi + 0x14]
call fcn.00404fd5
mov ecx, esi
call fcn.00407750
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x48], 0x1011cd14
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 4], 4
jmp 0x40ad79
movzx eax, word [edi]
cmp ax, word [ebp - 0x1c]
je 0x40ad7e
mov ecx, dword [ebp - 0x18]
movzx eax, ax
push 1
mov dword [ebp + 8], eax
push 1
lea eax, [ebp + 8]
push eax
add ecx, 0xc
call fcn.00404da3
movzx eax, word [edi]
mov cl, al
and cx, 0xff
cmp cx, ax
jne 0x40ad5e
mov al, byte [edi]
mov byte [ebp + 8], al
jmp 0x40ad62
mov byte [ebp + 8], 0
push 1
push 1
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x48]
call fcn.004049ce
mov ecx, esi
call fcn.00407750
cmp word [edi], bx
jne 0x40ad26
mov ecx, esi
call fcn.00407750
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x40ad96
mov dword [ebp + 8], 0x10130a9c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
call fcn.004048cf
test eax, eax
pop ecx
pop ecx
je 0x40adb5
mov ecx, dword [ebp + 8]
xor eax, eax
cmp byte [ecx], al
sete al
jmp 0x40adb7
xor eax, eax
cmp eax, ebx
mov ebx, dword [ebp - 0x18]
je 0x40adcc
mov eax, dword [ebp - 0x1c]
lea ecx, [ebx + 0xc]
mov dword [ebx + 8], eax
call fcn.004070ab
push ebx
lea ecx, [esi + 0x3c]
call fcn.00404fd5
jmp 0x40af9c
cmp ax, 0x27
jne 0x40ade7
mov dword [ebp - 0x1c], 0x27
mov ecx, esi
call fcn.00407750
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x24], eax
inc eax
push 0x1c
mov dword [esi + 0xc], eax
call 0x4f62c0
test eax, eax
pop ecx
je 0x40ae18
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
and ecx, 0x10
push ecx
mov ecx, eax
call fcn.00406970
mov ebx, eax
jmp 0x40ae1a
xor ebx, ebx
lea ecx, [esi + 0x14]
push ebx
call fcn.00404fd5
push 0x20
call 0x4f62c0
test eax, eax
pop ecx
je 0x40ae49
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
shr ecx, 4
and ecx, 1
push ecx
push 0xffffffffffffffff
mov ecx, eax
call fcn.00404ed3
mov dword [ebp - 0x18], eax
jmp 0x40ae4d
and dword [ebp - 0x18], 0
push dword [ebp - 0x18]
lea ecx, [esi + 0x14]
call fcn.00404fd5
push 0x20
call 0x4f62c0
test eax, eax
pop ecx
je 0x40ae80
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
shr ecx, 4
not ecx
and ecx, 1
push ecx
push 0xffffffffffffffff
mov ecx, eax
call fcn.00404ed3
mov dword [ebp - 0x14], eax
jmp 0x40ae84
and dword [ebp - 0x14], 0
push dword [ebp - 0x14]
lea ecx, [esi + 0x14]
call fcn.00404fd5
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], 0x1011cd14
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], eax
cmp word [edi], ax
mov dword [ebp - 4], 2
je 0x40af09
movzx eax, word [edi]
cmp ax, word [ebp - 0x1c]
je 0x40af09
mov ecx, dword [ebp - 0x18]
movzx eax, ax
push 1
mov dword [ebp - 0x20], eax
push 1
lea eax, [ebp - 0x20]
push eax
add ecx, 0xc
call fcn.00404da3
movzx eax, word [edi]
mov cl, al
and cx, 0xff
cmp cx, ax
jne 0x40aee8
mov al, byte [edi]
mov byte [ebp - 0x10], al
jmp 0x40aeec
mov byte [ebp - 0x10], 0
push 1
push 1
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x48]
call fcn.004049ce
mov ecx, esi
call fcn.00407750
cmp word [edi], 0
jne 0x40aeb0
mov ecx, esi
call fcn.00407750
mov eax, dword [ebp - 0x3c]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x40af21
mov dword [ebp - 0x1c], 0x10130a9c
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004048cf
test eax, eax
pop ecx
pop ecx
je 0x40af40
mov ecx, dword [ebp - 0x1c]
xor eax, eax
cmp byte [ecx], al
sete al
jmp 0x40af42
xor eax, eax
test eax, eax
je 0x40af5d
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 4], eax
add ecx, 0xc
mov dword [edx + 4], eax
call fcn.004070ab
push dword [ebp - 0x18]
lea edi, [ebx + 4]
mov ecx, edi
call fcn.00404fd5
mov eax, dword [ebp + 8]
push dword [eax]
mov ecx, esi
call fcn.0040a57b
push eax
mov ecx, edi
call fcn.00404fd5
push dword [ebp - 0x14]
mov ecx, edi
call fcn.00404fd5
mov edi, dword [ebp - 0x24]
push 0
push edi
lea ecx, [esi + 0x50]
call fcn.00404700
mov eax, dword [esi + 0x5c]
mov dword [eax + edi*4], ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.0040495e
jmp 0x40aff1
mov ecx, esi
call fcn.00407750
push 8
call 0x4f62c0
mov edi, eax
pop ecx
mov dword [ebp - 0x24], edi
cmp edi, ebx
mov dword [ebp - 4], 3
je 0x40afe0
mov eax, dword [ebp + 8]
push dword [eax]
mov ecx, esi
call fcn.0040a57b
mov dword [edi], 0x1011cdc8
mov dword [edi + 4], eax
jmp 0x40afe2
xor edi, edi
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [esi + 0x14]
call fcn.00404fd5
mov ebx, edi
mov edi, ebx
mov ecx, esi
call fcn.00407750
mov eax, edi
call 0x4f618e
ret 4
push 0x1c
call 0x4f62c0
test eax, eax
mov ebx, dword [ebp + 8]
pop ecx
je 0x40b024
mov ecx, dword [ebx]
and ecx, 0x10
push ecx
mov ecx, eax
call fcn.00406970
mov edi, eax
jmp 0x40b026
xor edi, edi
lea ecx, [esi + 0x14]
push edi
call fcn.00404fd5
inc dword [esi + 8]
mov eax, dword [esi + 8]
push 0x20
mov dword [ebp - 0x1c], eax
call 0x4f62c0
test eax, eax
pop ecx
je 0x40b05c
mov ecx, dword [ebx]
shr ecx, 4
and ecx, 1
push ecx
push dword [ebp - 0x1c]
mov ecx, eax
call fcn.00404ed3
mov dword [ebp + 8], eax
jmp 0x40b060
and dword [ebp + 8], 0
push dword [ebp + 8]
lea ecx, [esi + 0x14]
call fcn.00404fd5
push dword [ebp + 8]
lea ecx, [edi + 4]
call fcn.00404fd5
push dword [ebx]
mov ecx, esi
call fcn.0040a57b
push eax
lea ecx, [edi + 4]
call fcn.00404fd5
push 0x20
call 0x4f62c0
test eax, eax
pop ecx
je 0x40b0ad
mov ecx, dword [ebx]
shr ecx, 4
not ecx
and ecx, 1
push ecx
push dword [ebp - 0x1c]
mov ecx, eax
call fcn.00404ed3
mov ebx, eax
jmp 0x40b0af
xor ebx, ebx
push ebx
lea ecx, [esi + 0x14]
call fcn.00404fd5
push ebx
lea ecx, [edi + 4]
call fcn.00404fd5
mov ebx, dword [ebp - 0x1c]
push 0
push ebx
lea ecx, [esi + 0x28]
call fcn.00404700
mov eax, dword [esi + 0x34]
mov dword [eax + ebx*4], edi
jmp 0x40aff3