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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x101dc354]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x2c], edx
push esi
push 0x80
push 3
push esi
push 1
mov eax, ecx
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp + 8]
mov ebx, esi
push SysReAllocString
push eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x24], ebx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x100bffff
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSizeEx]
test eax, eax
je 0x100c0058
cmp dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x14]
jl 0x10098fc9
jg 0x100c00a2
cmp esi, 0xffffffff
ja 0x100c00a2
lea eax, [esi + 2]
push eax
call fcn.100b84fe
mov dword [ebp - 0x20], eax
pop ecx
test eax, eax
je 0x100c0080
lea ecx, [esi + 2]
push ecx
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov ecx, ebx
test esi, esi
je 0x10099028
push 0
lea edx, [ebp - 0xc]
mov eax, esi
sub eax, ecx
push edx
push eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x20]
add eax, ecx
push eax
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x100c00b1
mov ecx, dword [ebp - 0x18]
cmp dword [ebp - 0xc], ebx
je 0x10099028
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x18], ecx
cmp ecx, esi
jb 0x10098ff3
xor eax, eax
push eax
push eax
push ecx
push dword [ebp - 0x20]
push eax
push 0xfde9
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov ebx, eax
lea ecx, [ebp - 0x24]
lea eax, [ebx + 1]
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.100a70d5
mov esi, eax
test esi, esi
js 0x100c00ec
lea eax, [ebx*2 + 2]
mov ebx, dword [ebp - 0x24]
push eax
push 0
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov ecx, dword [ebp - 0x18]
add esp, 0xc
push dword [ebp - 0xc]
push ebx
push ecx
push dword [ebp - 0x20]
push 0
push 0xfde9
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
test eax, eax
je 0x100c0109
test edi, edi
je 0x1009909b
push edi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
xor edi, edi
push dword [ebp - 0x28]
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
call fcn.1009925c
mov esi, eax
test esi, esi
js 0x100c012e
mov eax, dword [ebp - 0x2c]
mov dword [eax], ebx
xor ebx, ebx
push dword [ebp - 0x20]
call fcn.100b84f9
pop ecx
test edi, edi
jne 0x100c0148
test ebx, ebx
jne 0x100c015d
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100b88c0
leave
ret 4
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
mov edi, 0x80070000
test esi, esi
jle 0x100c0015
movzx esi, si
or esi, edi
cmp esi, 0x80070002
je 0x100990d2
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100c0034
movzx esi, si
or esi, edi
test esi, esi
js 0x100c003b
mov esi, 0x80004005
push dword [ebp - 0x1c]
push 0x10047a54
push 1
push esi
push 0x4000000
call fcn.100ab973
add esp, 0x14
jmp 0x100990d2
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100c006f
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x100c0076
mov esi, 0x80004005
push dword [ebp - 0x1c]
push 0x10047a74
jmp 0x100c008d
push dword [ebp - 0x1c]
mov esi, 0x8007000e
push 0x10047ac0
push 1
push esi
push 0x4000000
call fcn.100ab973
add esp, 0x14
jmp 0x100990c2
push dword [ebp - 0x1c]
mov esi, 0x80070057
push 0x10047aa0
jmp 0x100c008d
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100c00c8
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x100c00cf
mov esi, 0x80004005
push dword [ebp - 0x1c]
push 0x10047b08
push 1
push esi
push 0x4000000
call fcn.100ab973
add esp, 0x14
jmp 0x100990b9
push 0x10047b28
push 1
push esi
push 0x4000000
call fcn.100ab973
mov ebx, dword [ebp - 0x24]
add esp, 0x10
jmp 0x100990b9
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100c0120
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x100c0127
mov esi, 0x80004005
push 0x10047b4c
jmp 0x100c0133
push 0x10047b78
push 1
push esi
push 0x4000000
call fcn.100ab973
add esp, 0x10
jmp 0x100990b9
cmp edi, 0xffffffff
je 0x100990ca
push edi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x100990ca
lea eax, [ebx - 4]
push eax
call fcn.100b84f9
pop ecx
jmp 0x100990d2