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

Disassembly:
push ebp
lea ebp, [esp - 0xffa0]
mov eax, 0x10020
call fcn.00406e70
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp + 0xff9c], eax
mov ecx, dword [ebp + 0xffac]
mov eax, dword [ebp + 0xffa8]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
mov edi, 0x80000000
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebp + 0xffb0]
push edi
push eax
mov dword [ebp - 0x7c], ecx
mov dword [ecx], ebx
call esi
mov dword [ebp - 0x68], eax
cmp eax, 0xffffffff
je 0x402102
push ebx
push ebx
push 3
push ebx
push 1
push edi
push dword [ebp - 0x74]
call esi
mov dword [ebp - 0x6c], eax
cmp eax, 0xffffffff
je 0x4020f4
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push dword [ebp - 0x68]
call edi
push ebx
push dword [ebp - 0x6c]
mov esi, eax
call edi
cmp esi, 0xffffffff
je 0x4020e6
cmp eax, 0xffffffff
je 0x4020e6
cmp esi, eax
je 0x401fc3
cmp dword [ebp - 0x6c], ebx
je 0x401fad
push dword [ebp - 0x6c]
call fcn.00401d1a
pop ecx
cmp dword [ebp - 0x68], ebx
je 0x401fbb
push dword [ebp - 0x68]
call fcn.00401d1a
pop ecx
xor eax, eax
inc eax
jmp 0x402104
mov eax, esi
and esi, 0x7fff
shr eax, 0xf
mov dword [ebp - 0x78], esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x74], ebx
cmp eax, ebx
jbe 0x402050
mov edi, 0x8000
push ebx
lea eax, [ebp - 0x70]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x68]
call esi
test eax, eax
je 0x4020e6
cmp dword [ebp - 0x70], edi
jne 0x4020e6
push ebx
lea eax, [ebp - 0x70]
push eax
push edi
lea eax, [ebp + 0x7f9c]
push eax
push dword [ebp - 0x6c]
call esi
test eax, eax
je 0x4020e6
cmp dword [ebp - 0x70], edi
jne 0x4020e6
push edi
lea eax, [ebp + 0x7f9c]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0040591b
add esp, 0xc
test eax, eax
jne 0x401f9f
inc dword [ebp - 0x74]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x80]
jb 0x401fe6
cmp dword [ebp - 0x78], ebx
je 0x4020be
push ebx
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x78]
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x68]
call esi
test eax, eax
je 0x4020e6
mov eax, dword [ebp - 0x78]
cmp dword [ebp - 0x70], eax
jne 0x4020e6
mov edi, dword [ebp - 0x6c]
push ebx
lea ecx, [ebp - 0x70]
push ecx
push eax
lea eax, [ebp + 0x7f9c]
push eax
push edi
call esi
test eax, eax
je 0x4020b7
mov eax, dword [ebp - 0x78]
cmp dword [ebp - 0x70], eax
jne 0x4020b7
push eax
lea eax, [ebp + 0x7f9c]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0040591b
add esp, 0xc
test eax, eax
je 0x4020c1
cmp edi, ebx
je 0x401fad
push edi
jmp 0x401fa7
cmp edi, ebx
je 0x4020f4
push edi
jmp 0x4020ee
mov edi, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x7c]
xor esi, esi
inc esi
mov dword [eax], esi
cmp edi, ebx
je 0x4020d4
push edi
call fcn.00401d1a
pop ecx
cmp dword [ebp - 0x68], ebx
je 0x4020e2
push dword [ebp - 0x68]
call fcn.00401d1a
pop ecx
mov eax, esi
jmp 0x402104
cmp dword [ebp - 0x6c], ebx
je 0x4020f4
push dword [ebp - 0x6c]
call fcn.00401d1a
pop ecx
cmp dword [ebp - 0x68], ebx
je 0x402102
push dword [ebp - 0x68]
call fcn.00401d1a
pop ecx
xor eax, eax
mov ecx, dword [ebp + 0xff9c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004051ba
add ebp, 0xffa0
leave
ret