Function at 0x40e390
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4b15e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, ecx
push 0x4f4c50
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], edi
call fcn.004a2cae
xor ebx, ebx
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x20]
push ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x44], ebx
call fcn.00411b50
add esp, 0x24
cmp eax, ebx
je 0x40e75e
cmp dword [esp + 0x20], 7
je 0x40e75e
push ebx
push esi
call fcn.00412aa0
add esp, 8
test eax, eax
je 0x40e75e
push esi
lea ecx, [esp + 0x44]
mov dword [esp + 0x18], ebx
call fcn.00447770
mov eax, dword [eax]
lea ecx, [esp + 0x14]
push ecx
push ebx
push ebx
push eax
mov byte [esp + 0x48], 1
call fcn.00411e80
add esp, 0x10
lea ecx, [esp + 0x40]
mov ebp, eax
mov byte [esp + 0x38], bl
call fcn.00447cd0
cmp ebp, ebx
jne 0x40e4ae
lea edx, [esp + 0x40]
lea eax, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x48], ebx
call fcn.00411870
mov esi, eax
lea ecx, [esp + 0x30]
push esi
push ecx
call fcn.00401ab0
add esp, 0x10
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [eax]
push ecx
push esi
push edx
lea eax, [esp + 0x20]
push 0x4e132c
push eax
mov byte [esp + 0x50], 2
call fcn.004a0c59
add esp, 0x18
lea ecx, [esp + 0x28]
mov byte [esp + 0x38], bl
call fcn.004a2c3a
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, edi
call fcn.0040b000
mov dword [esp + 0x14], ebx
jmp 0x40e720
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40e73b
push eax
call fcn.004a2973
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x40e73b
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
mov dword [esp + 0x1c], ebx
rep stosb byte es:[edi], al
lea ecx, [esp + 0x2c]
call fcn.00447770
mov edx, dword [esp + 0x14]
mov eax, dword [eax]
lea ecx, [esp + 0x18]
mov byte [esp + 0x38], 3
push ecx
push edx
push ebp
push eax
call fcn.00411e80
add esp, 0x10
lea ecx, [esp + 0x28]
test eax, eax
sete byte [esp + 0x40]
mov byte [esp + 0x38], bl
call fcn.00447cd0
cmp byte [esp + 0x40], bl
je 0x40e737
push esi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x28], ebx
call fcn.00447770
mov eax, dword [eax]
lea ecx, [esp + 0x24]
push ebx
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
mov byte [esp + 0x5c], 4
call fcn.00411b50
add esp, 0x24
lea ecx, [esp + 0x28]
test eax, eax
setne byte [esp + 0x40]
mov byte [esp + 0x38], bl
call fcn.00447cd0
cmp byte [esp + 0x40], bl
je 0x40e6ac
cmp dword [esp + 0x24], 3
jne 0x40e713
push esi
lea ecx, [esp + 0x44]
call fcn.00447770
mov eax, dword [eax]
push ebx
push ebx
push 3
push ebx
push 7
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
lea ecx, [esp + 0x40]
mov esi, eax
call fcn.00447cd0
cmp esi, 0xffffffff
je 0x40e713
mov edx, dword [esp + 0x14]
push 2
neg edx
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push ebx
push eax
push ecx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp ecx, eax
je 0x40e60a
push ecx
push eax
lea edx, [esp + 0x18]
push 0x4e12ec
push edx
call fcn.004a0c59
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp eax, ebx
je 0x40e695
push 0x4e0b28
jmp 0x40e68c
xor eax, eax
cmp ecx, ebx
jbe 0x40e61a
cmp byte [eax + ebp], bl
jne 0x40e62e
inc eax
cmp eax, ecx
jb 0x40e610
lea eax, [esp + 0x10]
push 0x4e12d0
push eax
call fcn.004a0c59
add esp, 8
jmp 0x40e695
lea ecx, [esp + 0x40]
lea edx, [esp + 0x28]
push ecx
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x48], ebx
call fcn.00411870
mov edi, eax
lea eax, [esp + 0x34]
push edi
push eax
call fcn.00401ab0
add esp, 0x10
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x28]
mov eax, dword [eax]
push ecx
push edx
push edi
push eax
lea ecx, [esp + 0x20]
push 0x4e126c
push ecx
mov byte [esp + 0x50], 5
call fcn.004a0c59
add esp, 0x18
lea ecx, [esp + 0x2c]
mov byte [esp + 0x38], bl
call fcn.004a2c3a
push 0x4e0e58
lea ecx, [esp + 0x14]
call fcn.004a302b
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push edx
call fcn.0040b000
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40e713
lea eax, [esp + 0x40]
lea ecx, [esp + 0x28]
push eax
push ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x48], ebx
call fcn.00411870
mov esi, eax
lea edx, [esp + 0x34]
push esi
push edx
call fcn.00401ab0
add esp, 0x10
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x28]
mov eax, dword [eax]
push ecx
push edx
push esi
push eax
lea ecx, [esp + 0x20]
push 0x4e1200
push ecx
mov byte [esp + 0x50], 6
call fcn.004a0c59
add esp, 0x18
lea ecx, [esp + 0x2c]
mov byte [esp + 0x38], bl
call fcn.004a2c3a
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push edx
call fcn.0040b000
push ebp
call fcn.004a299c
mov edi, dword [esp + 0x20]
add esp, 4
lea eax, [esp + 0x10]
push 0x4e1120
push eax
call fcn.004a0c59
add esp, 8
jmp 0x40e7f8
mov edi, dword [esp + 0x1c]
push esi
mov ecx, edi
call fcn.0040d8d0
test eax, eax
jne 0x40e7f8
push 0x4e110c
lea ecx, [esp + 0x14]
call fcn.004a2dd1
jmp 0x40e7f8
lea ecx, [esp + 0x40]
lea edx, [esp + 0x28]
push ecx
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x48], ebx
call fcn.00411870
mov ebp, eax
add esp, 8
cmp ebp, 0x22
jne 0x40e78f
push str._rN_f
lea ecx, [esp + 0x14]
call fcn.004a2dd1
jmp 0x40e7f8
push esi
call fcn.00412bd0
add esp, 4
cmp eax, ebx
je 0x40e7ac
push str.ech
lea ecx, [esp + 0x14]
call fcn.004a302b
jmp 0x40e7f8
push esi
mov ecx, edi
call fcn.0040d8d0
test eax, eax
jne 0x40e7f8
lea eax, [esp + 0x2c]
push ebp
push eax
call fcn.00401ab0
add esp, 8
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x28]
mov eax, dword [eax]
push ecx
push edx
push ebp
push eax
lea ecx, [esp + 0x20]
push str._rN_f8
push ecx
mov byte [esp + 0x50], 7
call fcn.004a0c59
add esp, 0x18
lea ecx, [esp + 0x2c]
mov byte [esp + 0x38], bl
call fcn.004a2c3a
mov edx, dword [esp + 0x10]
mov ecx, edi
push edx
call fcn.0040b000
mov ecx, edi
call fcn.0040cbd0
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
call fcn.004a2c3a
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 4