Function at 0x40f550
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 0x40f576
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0x8f4
ret 0xc
mov ecx, dword [0x4918ec]
mov eax, dword [ebx + 0x54]
push ecx
push eax
call fcn.0040f3f0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40f5a0
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 0x40f5bc
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 0x40fa35
cmp ax, 0xffff
je 0x40fa35
mov cx, word [ebp + 0x1a4]
mov esi, dword [esp + 0x90c]
cmp si, cx
jae 0x40fa24
mov eax, dword [ebp + 0x1c8]
test eax, eax
je 0x40f694
mov eax, dword [ebp + 0x1b4]
cmp eax, 5
je 0x40f60c
cmp eax, 7
jne 0x40f694
test byte [ebp + 0x1b8], 4
je 0x40f694
lea edx, [esp + 0x10]
lea edi, [ebp + 0x1cc]
push edx
lea edx, [esp + 0xa8]
push 0x50
push edx
push edi
push esi
push ecx
push eax
call fcn.004154e0
test ax, ax
jne 0x40f67d
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.004114a0
test ax, ax
jne 0x40f67d
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.00415f00
push ebp
push eax
call fcn.0040d340
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 0x45203c
push eax
call fcn.004362ea
xor ecx, ecx
lea edx, [esp + 0x44]
mov cx, word [ebp + 0x44]
push ecx
push 0x45203c
push edx
call fcn.004362ea
and esi, 0xffff
lea eax, [esp + 0x44]
push esi
push 0x45203c
push eax
call fcn.004362ea
add esp, 0x24
lea ecx, [esp + 0xf4]
push 0x40
push ecx
push ebx
call fcn.0040ccc0
test ax, ax
jne 0x40fa39
lea edx, [esp + 0x2c]
lea eax, [esp + 0x38]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
push 3
push 0x452034
call fcn.0041a9f0
mov edx, eax
add esp, 0x14
test edx, edx
jne 0x40f79d
push ebp
push 0x4a
call fcn.0040d340
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.00434c6c
lea ecx, [esp + 0x48]
lea edx, [esp + 0x458]
push ecx
push edx
push str.readKey
push 3
push 0x451f24
call fcn.0041a9f0
mov edx, eax
add esp, 0x18
test edx, edx
jne 0x40f808
push ebp
push 0x4a
call fcn.0040d340
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.00434c6c
lea ecx, [esp + 0x138]
push ecx
call fcn.0041aad0
mov edx, eax
add esp, 8
test edx, edx
jne 0x40f862
push ebp
push 0x4a
call fcn.0040d340
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.00434c6c
lea ecx, [esp + 0x2c8]
lea edx, [esp + 0x138]
push ecx
push ebp
push edx
call fcn.00418080
add esp, 0x10
test ax, ax
je 0x40f8c3
push ebp
push eax
call fcn.0040d260
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
lea eax, [esp + 0x2c4]
push eax
call fcn.0041a7c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40f8f1
push ebp
push 0x42
call fcn.0040d340
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 0x451f24
call fcn.0041a620
push esi
mov edi, eax
call fcn.00434c6c
add esp, 0x1c
test di, di
je 0x40f93e
push ebp
push 0x42
call fcn.0040d340
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 0x40f982
test cl, cl
je 0x40f97e
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40f982
add eax, 2
add esi, 2
test cl, cl
jne 0x40f95a
xor eax, eax
jmp 0x40f987
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40f9af
lea eax, [esp + 0x774]
push eax
call fcn.004366a5
push ebp
push eax
call fcn.0040d340
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 0x452034
call fcn.0041a620
add esp, 0x10
test ax, ax
je 0x40f9e8
push ebp
push 0x42
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8f4
ret 0xc
lea eax, [esp + 0x20]
push eax
call fcn.004366a5
mov ecx, dword [esp + 0x914]
lea esi, [ebp + 0x68]
push esi
mov word [ecx], ax
call fcn.0043c802
mov edi, dword [esi]
push ebp
add edi, 0x78
push 0
mov dword [esi], edi
call fcn.0040d340
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