Function at 0x401ea0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x554efc]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
mov edi, ecx
push 0
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x401ee7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00457db8
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0
push 0
lea esi, [eax + 1]
push esi
lea eax, [esp + 0x3c]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
lea eax, [esp + 0x34]
mov byte [esp + esi + 0x33], 0
push 0
push eax
call fcn.0041b850
mov ebx, eax
add esp, 0xc
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x4020db
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401f31
sub ecx, edx
mov dword [esp + 0x24], 0
sar ecx, 1
xor eax, eax
push ecx
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 7
mov word [esp + 0x1c], ax
call fcn.00407e50
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 1
nop dword [eax]
cmp dword [esp + 0x28], 8
lea eax, [esp + 0x14]
push 0
cmovae eax, dword [esp + 0x18]
push 0x80
push 3
push 0
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401fb5
cmp esi, 1
jle 0x401fb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x401fb5
push 0x32
call ebx
dec esi
jmp 0x401f70
mov edx, dword [esp + 0x28]
cmp edx, 8
jb 0x401ff3
mov ecx, dword [esp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401fe9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401fe9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00457dc9
add esp, 8
xor eax, eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 7
mov word [esp + 0x14], ax
cmp edi, 0xffffffff
je 0x4020d7
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
xor edx, edx
mov ecx, ebx
add ecx, 2
setb dl
neg edx
or edx, ecx
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x4020b5
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
or ecx, 0xffffffff
test eax, eax
cmovne ecx, dword [esp + 0x2c]
cmp ecx, ebx
jne 0x4020ab
xor eax, eax
push eax
push eax
push eax
push ebx
push esi
mov word [esi + ebx], ax
call fcn.0041b8e0
add esp, 0x14
mov ebx, eax
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00457db8
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ebx, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00457db8
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x13c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00457db8
mov esp, ebp
pop ebp
ret