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

Disassembly:
mov eax, 0x10803e1
call fcn.01068a88
sub esp, 0x88
push ebx
push esi
push edi
xor ebx, ebx
push 0x10055ac
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
call fcn.01012a13
push 0x1005598
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 1
call fcn.01012a13
push 0x1003308
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 2
call fcn.01012a13
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
push ebx
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x10313c0
mov eax, 0x1001d48
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
or edi, 0xffffffff
cmp eax, edi
mov dword [ebp - 0x14], eax
jne 0x10313ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jmp 0x10316d9
lea eax, [ebp - 0x5c]
push eax
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x10316cb
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x10316cb
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x10316cb
movzx eax, word [ebp - 0x54]
push eax
movzx eax, word [ebp - 0x4e]
push eax
movzx eax, word [ebp - 0x52]
push eax
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x1005584
call fcn.01071779
lea eax, [ebp - 0x34]
push eax
call fcn.01071dc3
add esp, 0x20
push edi
push ebx
push eax
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 5
call fcn.0101292a
push 1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.0101260e
movzx eax, word [ebp - 0x48]
push eax
movzx eax, word [ebp - 0x4a]
push eax
movzx eax, word [ebp - 0x4c]
push eax
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x100556c
call fcn.01071779
lea eax, [ebp - 0x34]
push eax
call fcn.01071dc3
add esp, 0x20
push edi
push ebx
push eax
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 6
call fcn.0101292a
push 1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.0101260e
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x24], esi
je 0x10316cb
push esi
lea eax, [ebp - 0x34]
push 0x100317c
push eax
call fcn.01071ba0
add esp, 0xc
push edi
push ebx
push eax
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 7
call fcn.0101292a
push 1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.0101260e
lea edi, [esi + 2]
push edi
mov dword [ebp - 0x20], ebx
call fcn.01015ada
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
je 0x1031622
mov ecx, edi
mov edi, dword [ebp - 0x18]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [esi + esi + 2]
push edi
call fcn.01015ada
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
jne 0x103155e
push dword [ebp - 0x18]
call fcn.01012555
pop ecx
jmp 0x1031622
mov ecx, edi
mov edi, dword [ebp - 0x10]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
push ebx
rep stosb byte es:[edi], al
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x20]
push eax
push esi
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x10316bb
cmp dword [ebp - 0x20], esi
jne 0x10316bb
push ebx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
jne 0x10315c7
push esi
push dword [ebp - 0x10]
push esi
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push dword [ebp - 0x10]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x20], eax
call fcn.01012a13
mov byte [ebp - 4], 8
jmp 0x10315d4
push edi
lea ecx, [ebp - 0x34]
call fcn.01012a13
mov byte [ebp - 4], 9
push 0xffffffffffffffff
lea eax, [ebp - 0x34]
push ebx
lea ecx, [ebp - 0x44]
push eax
call fcn.0101292a
lea ecx, [ebp - 0x34]
push 1
mov byte [ebp - 4], 4
call fcn.0101260e
push dword [ebp - 0x10]
call fcn.01012555
push edi
call fcn.01012555
pop ecx
pop ecx
push ebx
push ebx
push 0x64
call fcn.01070f65
cmp eax, ebx
je 0x1031619
mov ecx, eax
call fcn.01027dca
mov esi, eax
jmp 0x103161b
xor esi, esi
cmp esi, ebx
mov dword [ebp - 0x1c], esi
jne 0x103162e
mov dword [ebp - 0x10], 0xe
jmp 0x10316d4
push 0x19
pop ecx
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
lea eax, [esi + 0x10]
push eax
sub esp, 0x10
lea eax, [ebp - 0x44]
mov dword [ebp - 0x18], esp
mov ecx, esp
push eax
call fcn.01012fdc
call fcn.0102dc58
cmp eax, ebx
mov dword [ebp - 0x10], eax
mov ecx, esi
jl 0x10316af
mov eax, dword [ebp - 0x24]
or edi, 0xffffffff
push edi
mov dword [esi + 0x50], eax
push ebx
lea eax, [ebp + 8]
push eax
call fcn.0101292a
push edi
push ebx
lea eax, [ebp - 0x6c]
push eax
lea ecx, [esi + 0x30]
call fcn.0101292a
push edi
push ebx
lea eax, [ebp - 0x84]
push eax
lea ecx, [esi + 0x40]
call fcn.0101292a
push edi
push ebx
lea eax, [ebp - 0x44]
push eax
lea ecx, [esi + 0x20]
call fcn.0101292a
mov al, byte [ebp + 0x18]
mov byte [esi + 0x58], al
mov byte [esi + 0x59], bl
mov dword [esi + 0x60], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x54], ebx
jmp 0x10316d4
push 1
call fcn.01027e01
mov dword [ebp - 0x1c], ebx
jmp 0x10316d4
push edi
call fcn.01012555
push dword [ebp - 0x10]
call fcn.01012555
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x14], ebx
je 0x10316e2
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], ebx
je 0x1031710
cmp dword [ebp - 0x10], 0x800704b8
jne 0x1031704
push 0x111
push dword [ebp + 0x1c]
mov ecx, 0x10987fc
call fcn.01075c88
jmp 0x1031710
push dword [ebp + 0x1c]
push ebx
push dword [ebp - 0x10]
call fcn.01035a95
xor esi, esi
inc esi
push esi
lea ecx, [ebp - 0x44]
call fcn.0101260e
push esi
lea ecx, [ebp - 0x94]
call fcn.0101260e
push esi
lea ecx, [ebp - 0x84]
call fcn.0101260e
push esi
lea ecx, [ebp - 0x6c]
call fcn.0101260e
push esi
lea ecx, [ebp + 8]
call fcn.0101260e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x18