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

Disassembly:
sub esp, 0x8f4
push ebx
mov ebx, dword [esp + 0x8fc]
push ebp
push esi
test ebx, ebx
push edi
jne 0x40a966
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0x8f4
ret 0xc
mov ecx, dword [0x462a4c]
mov eax, dword [ebx + 0x54]
push ecx
push eax
call fcn.0040a870
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40a990
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x8f4
ret 0xc
mov eax, dword [esp + 0x910]
test eax, eax
jne 0x40a9ac
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0x8f4
ret 0xc
mov ax, word [ebp + 0x44]
test ax, ax
je 0x40ae25
cmp ax, 0xffff
je 0x40ae25
mov cx, word [ebp + 0x1a4]
mov esi, dword [esp + 0x90c]
cmp si, cx
jae 0x40ae14
mov eax, dword [ebp + 0x1c4]
test eax, eax
je 0x40aa84
mov eax, dword [ebp + 0x1b4]
cmp eax, 5
je 0x40a9fc
cmp eax, 7
jne 0x40aa84
test byte [ebp + 0x1b8], 4
je 0x40aa84
lea edx, [esp + 0x10]
lea edi, [ebp + 0x1c8]
push edx
lea edx, [esp + 0xa8]
push 0x50
push edx
push edi
push esi
push ecx
push eax
call fcn.00409000
test ax, ax
jne 0x40aa6d
lea eax, [esp + 0x50]
lea ecx, [esp + 0x54]
push eax
mov eax, dword [esp + 0x14]
push 0x50
push ecx
lea edx, [esp + 0xb0]
push 0x50
push edx
push eax
push ebx
call fcn.0040af60
test ax, ax
jne 0x40aa6d
mov ecx, dword [esp + 0x910]
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [ebp + 0x1b4]
lea edx, [esp + 0x58]
push edi
push edx
push eax
push ecx
call fcn.004091a0
push ebp
push eax
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
mov ecx, 0x64
xor eax, eax
lea edi, [esp + 0x2c4]
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x454]
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x134]
rep stosd dword es:[edi], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x18], eax
xor ecx, ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], eax
movsx ecx, word [ebp + 0x5a]
lea eax, [esp + 0x14]
mov dx, word [ebp + ecx*2 + 0x46]
push edx
push 0x45d040
push eax
call fcn.00430b40
xor ecx, ecx
lea edx, [esp + 0x44]
mov cx, word [ebp + 0x44]
push ecx
push 0x45d040
push edx
call fcn.00430b40
and esi, 0xffff
lea eax, [esp + 0x44]
push esi
push 0x45d040
push eax
call fcn.00430b40
add esp, 0x24
lea ecx, [esp + 0xf4]
push 0x40
push ecx
push ebx
call fcn.00405ab0
test ax, ax
jne 0x40ae29
lea edx, [esp + 0x2c]
lea eax, [esp + 0x38]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
push 3
push 0x45d038
call fcn.00410310
mov edx, eax
add esp, 0x14
test edx, edx
jne 0x40ab8d
push ebp
push 0x4a
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x454]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00437410
lea ecx, [esp + 0x48]
lea edx, [esp + 0x458]
push ecx
push edx
push str.readKey
push 3
push 0x45cf28
call fcn.00410310
mov edx, eax
add esp, 0x18
test edx, edx
jne 0x40abf8
push ebp
push 0x4a
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00437410
lea ecx, [esp + 0x138]
push ecx
call fcn.004103f0
mov edx, eax
add esp, 8
test edx, edx
jne 0x40ac52
push ebp
push 0x4a
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00437410
lea ecx, [esp + 0x2c8]
lea edx, [esp + 0x138]
push ecx
push ebp
push edx
call fcn.0040d980
add esp, 0x10
test ax, ax
je 0x40acb3
push ebp
push eax
call fcn.00406050
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
lea eax, [esp + 0x2c4]
push eax
call fcn.004100e0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40ace1
push ebp
push 0x42
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
lea ecx, [esp + 0x2c4]
lea edx, [esp + 0x774]
push ecx
lea eax, [esp + 0x5e8]
push edx
push eax
push esi
push 3
push 0x45cf28
call fcn.0040ff40
push esi
mov edi, eax
call fcn.00437410
add esp, 0x1c
test di, di
je 0x40ad2e
push ebp
push 0x42
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
mov byte [esp + 0x773], 0
mov byte [esp + 0x903], 0
mov esi, str.error
lea eax, [esp + 0x5e4]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40ad72
test cl, cl
je 0x40ad6e
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40ad72
add eax, 2
add esi, 2
test cl, cl
jne 0x40ad4a
xor eax, eax
jmp 0x40ad77
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40ad9f
lea eax, [esp + 0x774]
push eax
call fcn.0043f764
push ebp
push eax
call fcn.00406130
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
lea ecx, [esp + 0x20]
lea edx, [esp + 0x2c4]
push ecx
push edx
push 1
push 0x45d038
call fcn.0040ff40
add esp, 0x10
test ax, ax
je 0x40add8
push ebp
push 0x42
call fcn.00406130
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
lea eax, [esp + 0x20]
push eax
call fcn.0043f764
mov ecx, dword [esp + 0x914]
lea esi, [ebp + 0x68]
push esi
mov word [ecx], ax
call fcn.0044245d
mov edi, dword [esi]
push ebp
add edi, 0x78
push 0
mov dword [esi], edi
call fcn.00406130
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
pop edi
pop esi
pop ebp
mov ax, 5
pop ebx
add esp, 0x8f4
ret 0xc
mov ax, 0x47
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc