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

Disassembly:
mov eax, 0x46e350
call fcn.00453e8c
sub esp, 0x5c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
push 0x489c48
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x4104cf
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x489c30
push eax
call esi
push 0x489c10
mov dword [ebp - 0x24], eax
push dword [ebp - 0x1c]
call esi
push 0x489bf4
mov dword [ebp - 0x20], eax
push dword [ebp - 0x1c]
call esi
cmp dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], eax
je 0x4104cf
cmp dword [ebp - 0x20], ebx
je 0x4104cf
cmp eax, ebx
je 0x4104cf
lea eax, [ebp - 0x11]
push ebx
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x68], 0x4755e0
mov dword [ebp - 0x48], 0x4755d8
call fcn.0040190c
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 2
cmp eax, ebx
jne 0x410481
mov eax, 0x493568
push eax
lea ecx, [ebp - 0x68]
call fcn.0040b32d
mov eax, dword [ebp - 0x60]
cmp eax, ebx
jne 0x410496
mov eax, 0x4755fc
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, ebx
mov byte [ebp - 4], 3
jne 0x4104df
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0041099e
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.00401093
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.004109b8
jmp 0x41058a
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.00453fde
mov edi, eax
pop ecx
cmp edi, ebx
mov dword [ebp - 0x34], edi
setne byte [ebp - 0x38]
lea eax, [ebp - 0x30]
push ebx
push eax
push esi
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x410520
cmp byte [ebp - 0x38], bl
je 0x4104b7
push edi
call fcn.004389b2
pop ecx
jmp 0x4104b7
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x2c]
push eax
push 0xffffffffffffffff
push ebx
push 4
push esi
push edi
push ebx
call dword [ebp - 0x20]
cmp eax, ebx
je 0x410549
cmp dword [ebp - 0x2c], ebx
jne 0x41059d
cmp byte [ebp - 0x38], bl
je 0x410555
push edi
call fcn.004389b2
pop ecx
cmp dword [ebp - 0x18], ebx
je 0x41056b
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x41056b
push dword [ebp - 0x18]
call eax
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.00401093
cmp dword [ebp - 0x1c], ebx
je 0x41058a
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp eax, ebx
je 0x41058a
push dword [ebp - 0x1c]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
push dword [ebp + 8]
mov eax, dword [ebp - 0x40]
push dword [eax + 0xc]
push 1
call dword [ebp - 0x24]
cmp byte [ebp - 0x38], bl
mov esi, eax
je 0x4105b9
push edi
call fcn.004389b2
pop ecx
cmp dword [ebp - 0x18], ebx
je 0x4105cf
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x4105cf
push dword [ebp - 0x18]
call eax
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.00401093
cmp dword [ebp - 0x1c], ebx
je 0x4105ee
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp eax, ebx
je 0x4105ee
push dword [ebp - 0x1c]
call eax
mov eax, esi
jmp 0x41058c