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

Disassembly:
push 0x73c
mov eax, 0x100b4bb1
call fcn.10087bf1
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x508]
call fcn.10036db3
xor edi, edi
lea ecx, [ebp - 0x508]
push edi
push edi
push esi
mov dword [ebp - 4], edi
call fcn.1003b4c7
lea eax, [ebp - 0x400]
push eax
lea ecx, [ebp - 0x19c]
call fcn.1003e28e
mov byte [ebp - 4], 1
mov esi, edi
mov ebx, edi
call fcn.10038749
push eax
lea ecx, [ebp - 0x94]
call fcn.1003e28e
mov byte [ebp - 4], 2
call fcn.10038755
mov ecx, eax
call fcn.1003eaa4
test al, al
je 0x1005146d
lea eax, [ebp - 0x19c]
push eax
lea ecx, [ebp - 0x94]
call fcn.1003e4fd
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call fcn.1003e4c3
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x73c], eax
cmp eax, 0xffffffff
jne 0x10051417
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 1
call fcn.1003e3b2
jmp 0x10051604
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x10051403
push ebx
mov dword [ebp - 0x744], edi
call fcn.100875b8
pop ecx
push edi
mov esi, eax
lea eax, [ebp - 0x744]
push eax
push ebx
push esi
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x744], ebx
je 0x100515ed
push esi
call fcn.10087069
pop ecx
mov esi, edi
jmp 0x10051403
call fcn.10038755
push eax
lea ecx, [ebp - 0x94]
call fcn.1003e4fd
call fcn.100389be
test al, al
je 0x10051494
call fcn.1003875b
mov dword [ebp - 0x73c], eax
jmp 0x10051503
call fcn.10038761
push eax
lea ecx, [ebp - 0x220]
call fcn.1003e28e
push edi
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.1003e4c3
push eax
call fcn.1003db16
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x740], eax
call fcn.1003e4c3
push eax
call fcn.10042adc
mov dword [ebp - 0x73c], eax
mov eax, dword [ebp - 0x740]
pop ecx
pop ecx
test eax, eax
je 0x100514ee
push eax
call fcn.10087069
pop ecx
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 2
call fcn.1003e3b2
mov eax, dword [ebp - 0x73c]
test eax, eax
je 0x10051403
lea eax, [ebp - 0x19c]
mov dword [ebp - 0x748], edi
push eax
lea ecx, [ebp - 0x118]
call fcn.1003e28e
push 0x100b79fc
push 0x100b7a00
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 4
call fcn.1003ec62
lea eax, [ebp - 0x738]
push eax
lea eax, [ebp - 0x748]
push eax
push 1
lea ecx, [ebp - 0x118]
call fcn.1003e4c3
push eax
push dword [ebp - 0x73c]
call fcn.100424aa
add esp, 0x14
test eax, eax
je 0x1005157a
lea ecx, [ebp - 0x118]
call fcn.1003e3b2
jmp 0x10051403
mov ebx, dword [ebp - 0x50c]
test ebx, ebx
je 0x1005156a
push ebx
call fcn.100875b8
push ebx
mov esi, eax
push esi
push dword [ebp - 0x748]
push dword [ebp - 0x73c]
call fcn.10042f31
add esp, 0x14
test eax, eax
je 0x100515cd
cmp eax, 0x600
je 0x100515cd
push esi
call fcn.10087069
pop ecx
mov esi, edi
call fcn.100389be
test al, al
jne 0x1005156a
push dword [ebp - 0x73c]
call fcn.1004228f
pop ecx
jmp 0x1005156a
call fcn.100389be
test al, al
jne 0x100515e2
push dword [ebp - 0x73c]
call fcn.1004228f
pop ecx
lea ecx, [ebp - 0x118]
call fcn.1003e3b2
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 1
call fcn.1003e3b2
test esi, esi
jne 0x10051685
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea ecx, [ebp - 0x19c]
call fcn.1003e4c3
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x73c], eax
cmp eax, 0xffffffff
je 0x10051681
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x10051681
push ebx
mov dword [ebp - 0x740], edi
call fcn.100875b8
pop ecx
push edi
mov esi, eax
lea eax, [ebp - 0x740]
push eax
push ebx
push esi
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x740], ebx
je 0x10051681
push esi
call fcn.10087069
pop ecx
jmp 0x10051697
test esi, esi
je 0x10051697
push ebx
push esi
call fcn.100512e8
push esi
mov edi, eax
call fcn.10087069
add esp, 0xc
lea ecx, [ebp - 0x19c]
call fcn.1003e3b2
lea ecx, [ebp - 0x508]
call fcn.1003723f
mov eax, edi
call fcn.10087baf
ret