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

Disassembly:
push 0xffffffffffffffff
push 0x10030e19
mov eax, dword fs:[0]
push eax
sub esp, 0x154
mov eax, dword [0x1003cb10]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1003cb10]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x178]
xor esi, esi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x170], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov byte [esp + 0x170], 1
cmp dword [esp + 0x194], 0x10
mov eax, dword [esp + 0x180]
jae 0x1000501f
lea eax, [esp + 0x180]
push esi
push 0x4000080
push 3
push esi
push esi
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x30], ebx
jne 0x1000509d
push ebp
lea ecx, [esp + 0x20]
call fcn.10007130
mov eax, dword [esp + 0x20]
cmp eax, esi
je 0x10005070
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
push ecx
call fcn.10003070
mov edx, dword [esp + 0x24]
add esp, 4
push edx
call fcn.1000a6ea
add esp, 4
cmp dword [esp + 0x194], 0x10
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
jb 0x10005096
mov eax, dword [esp + 0x180]
push eax
call fcn.1000a6ea
add esp, 4
mov eax, ebp
jmp 0x10005231
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea esi, [edi + 1]
push esi
call fcn.1000a6e5
add esp, 4
push 0
lea ecx, [esp + 0x40]
push ecx
mov ebp, eax
push edi
push ebp
push ebx
mov dword [esp + 0x48], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne al
test al, al
je 0x100051c3
push esi
call fcn.100160e1
mov esi, eax
add esp, 4
test esi, esi
jne 0x1000511d
mov edi, dword [esp + 0x38]
push edi
lea ecx, [esp + 0x20]
call fcn.10007130
lea esi, [esp + 0x1c]
call fcn.10004c30
cmp dword [esp + 0x194], 0x10
jb 0x10005116
mov edx, dword [esp + 0x180]
push edx
call fcn.1000a6ea
add esp, 4
mov eax, edi
jmp 0x10005231
push edi
push ebp
push esi
mov dword [esi], 0
call fcn.1001bcb0
add esp, 0xc
push 0x100361c0
push esi
mov edi, esi
call fcn.10016ff0
add esp, 8
mov ebp, eax
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
push 0x10036008
lea ecx, [esp + 0x1c]
mov byte [esp + 0x174], 2
call fcn.100032b0
test ebp, ebp
mov byte [esp + 0x170], 3
jne 0x10005264
mov byte [esp + 0x170], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100051a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x170], 1
cmp dword [esp + 0x58], 0x10
jb 0x100051bf
mov ecx, dword [esp + 0x44]
push ecx
call fcn.1000a6ea
add esp, 4
mov ebp, dword [esp + 0x34]
push ebp
call fcn.1000a6ea
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x38]
push esi
lea ecx, [esp + 0x20]
call fcn.10007130
mov eax, dword [esp + 0x20]
xor ebx, ebx
cmp eax, ebx
je 0x10005209
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x24]
push edx
call fcn.10003070
mov eax, dword [esp + 0x24]
add esp, 4
push eax
call fcn.1000a6ea
add esp, 4
cmp dword [esp + 0x194], 0x10
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
jb 0x1000522f
mov ecx, dword [esp + 0x180]
push ecx
call fcn.1000a6ea
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.10015adf
add esp, 0x160
ret 0x20
mov edi, dword [esp + 0x2c]
push 0x104
lea eax, [esp + 0x60]
push 0
push eax
call fcn.100197b0
mov eax, ebp
sub eax, edi
add esp, 0xc
cmp eax, 0xff
jge 0x1000517b
push eax
lea ecx, [esp + 0x60]
push edi
push ecx
call fcn.1001bcb0
add esp, 0xc
lea eax, [ebp + 2]
push 0x100361c0
push eax
mov dword [esp + 0x34], eax
call fcn.10016ff0
mov ebp, eax
lea eax, [esp + 0x64]
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100052b4
sub eax, edx
push eax
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x20]
call fcn.100035b0
lea edi, [esp + 0x18]
call fcn.100069c0
mov ebx, edi
call fcn.10006940
mov edx, dword [esp + 0x18]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x10005302
push esi
mov ecx, edi
call fcn.10003170
mov edx, dword [esp + 0x18]
lea eax, [esi + 1]
push eax
push edx
call fcn.1001728a
push eax
call fcn.10004100
add esp, 0xc
test esi, esi
jl 0x10005385
mov eax, dword [esp + 0x18]
cmp esi, dword [eax - 8]
jg 0x10005385
mov dword [eax - 0xc], esi
mov ecx, dword [esp + 0x18]
mov byte [esi + ecx], 0
mov edx, dword [esp + 0x18]
cmp dword [edx - 4], 1
jle 0x10005348
mov edx, dword [edx - 0xc]
push edx
lea ecx, [esp + 0x1c]
call fcn.100031c0
mov edx, dword [esp + 0x18]
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10005350
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x48]
call fcn.10002570
lea eax, [esp + 0x40]
push eax
lea esi, [esp + 0x20]
call fcn.10007230
test ebp, ebp
mov ebx, dword [esp + 0x30]
jne 0x10005260
jmp 0x1000517b
push 0x80070057
call fcn.10003120
int3