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

Disassembly:
sub esp, 0x900
push ebx
mov ebx, dword [esp + 0x908]
push ebp
push esi
test ebx, ebx
push edi
je 0x40ff6b
mov ecx, dword [0x4918ec]
mov eax, dword [ebx + 0x54]
push ecx
push eax
call fcn.0040f3f0
mov ebp, eax
mov eax, dword [esp + 0x924]
add esp, 8
test eax, eax
je 0x40ff6b
mov eax, dword [esp + 0x920]
test eax, eax
je 0x40ff6b
test ebp, ebp
jne 0x40fab1
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x900
ret 0x10
mov ax, word [ebp + 0x44]
test ax, ax
je 0x40ff5a
cmp ax, 0xffff
je 0x40ff5a
mov cx, word [ebp + 0x1a4]
mov esi, dword [esp + 0x918]
cmp si, cx
jae 0x40ff49
mov eax, dword [ebp + 0x1c8]
test eax, eax
je 0x40fb95
mov eax, dword [ebp + 0x1b4]
cmp eax, 5
je 0x40fb01
cmp eax, 7
jne 0x40fb95
test byte [ebp + 0x1b8], 4
je 0x40fb95
lea edx, [esp + 0x10]
lea edi, [ebp + 0x1cc]
push edx
lea edx, [esp + 0xb4]
push 0x50
push edx
push edi
push esi
push ecx
push eax
call fcn.00415680
test ax, ax
jne 0x40fb7e
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x60]
push eax
mov eax, dword [esp + 0x14]
push 0x50
push ecx
lea edx, [esp + 0xbc]
push 0x50
push edx
push eax
push ebx
call fcn.004114a0
test ax, ax
jne 0x40fb7e
mov ecx, dword [esp + 0x920]
mov edx, dword [esp + 0x91c]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [ebp + 0x1b4]
lea eax, [esp + 0x68]
push edi
push eax
push ecx
push edx
call fcn.00416030
push ebp
push eax
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
xor eax, eax
mov ecx, 0x64
mov dword [esp + 0x50], eax
lea edi, [esp + 0x2d0]
mov dword [esp + 0x54], eax
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x460]
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x140]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], edx
lea edx, [esp + 0x20]
movsx eax, word [ebp + 0x5a]
mov cx, word [ebp + eax*2 + 0x46]
push ecx
push 0x45203c
push edx
call fcn.004362ea
xor eax, eax
lea ecx, [esp + 0x20]
mov ax, word [ebp + 0x44]
push eax
push 0x45203c
push ecx
call fcn.004362ea
and esi, 0xffff
lea edx, [esp + 0x50]
push esi
push 0x45203c
push edx
call fcn.004362ea
add esp, 0x24
lea eax, [esp + 0x100]
push 0x40
push eax
push ebx
call fcn.0040ccc0
test ax, ax
jne 0x40ff6f
lea ecx, [esp + 0x38]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x24]
push edx
push eax
push 3
push 0x452034
call fcn.0041a9f0
mov edx, eax
add esp, 0x14
test edx, edx
jne 0x40fcaa
push ebp
push 0x4a
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x460]
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 + 0x54]
lea edx, [esp + 0x464]
push ecx
push edx
push str.xreadKey
push 3
push 0x451f24
call fcn.0041a9f0
mov edx, eax
add esp, 0x18
test edx, edx
jne 0x40fd15
push ebp
push 0x4a
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x140]
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 + 0x144]
push ecx
call fcn.0041aad0
mov edx, eax
add esp, 8
test edx, edx
jne 0x40fd6f
push ebp
push 0x4a
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x140]
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 + 0x2d4]
lea edx, [esp + 0x144]
push ecx
push ebp
push edx
call fcn.00418080
add esp, 0x10
test ax, ax
je 0x40fdd0
push ebp
push eax
call fcn.0040d260
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
lea eax, [esp + 0x2d0]
push eax
call fcn.0041a7c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fdfe
push ebp
push 0x42
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
lea ecx, [esp + 0x2d0]
lea edx, [esp + 0x780]
push ecx
lea eax, [esp + 0x5f4]
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 0x40fe4b
push ebp
push 0x42
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
mov byte [esp + 0x77f], 0
mov byte [esp + 0x90f], 0
mov esi, str.error
lea eax, [esp + 0x5f0]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40fe8f
test cl, cl
je 0x40fe8b
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40fe8f
add eax, 2
add esi, 2
test cl, cl
jne 0x40fe67
xor eax, eax
jmp 0x40fe94
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40febc
lea eax, [esp + 0x780]
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, 0x900
ret 0x10
lea ecx, [esp + 0x44]
lea edx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x2d4]
push edx
push eax
push 2
push 0x452034
call fcn.0041a620
add esp, 0x14
test ax, ax
je 0x40fefa
push ebp
push 0x42
call fcn.0040d340
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
lea ecx, [esp + 0x2c]
push ecx
call fcn.004366a5
mov edx, dword [esp + 0x920]
mov word [edx], ax
lea eax, [esp + 0x48]
push eax
call fcn.004366a5
mov ecx, dword [esp + 0x928]
lea esi, [ebp + 0x68]
push esi
mov byte [ecx], al
call fcn.0043c802
mov edi, dword [esi]
push ebp
add edi, 0x78
push 0
mov dword [esi], edi
call fcn.0040d340
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10
pop edi
pop esi
pop ebp
mov ax, 5
pop ebx
add esp, 0x900
ret 0x10
pop edi
pop esi
pop ebp
mov ax, 0x47
pop ebx
add esp, 0x900
ret 0x10
mov ax, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x900
ret 0x10