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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x11466fc
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x115f604]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [0x1161d94]
mov dword [ebp - 0x12c], eax
mov eax, dword [edx + 0xc]
xor esi, esi
mov ecx, 0x1161d94
mov dword [ebp - 0x120], esi
mov dword [ebp - 0x130], esi
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x128], edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x124], esi
push esi
push 0x1066f38
lea ecx, [ebp - 0x120]
push ecx
push 0x1066eb8
lea edx, [ebp - 0x11c]
push 2
push edx
mov byte [ebp - 4], 1
call fcn.01075110
add esp, 0x18
mov ebx, dword [ebp + 8]
test bl, bl
mov eax, dword [0x115f54c]
mov byte [ebp - 4], 2
jne 0x11202e3
mov eax, dword [0x115f550]
push eax
lea ecx, [ebp - 0x134]
call fcn.0107f6b0
lea eax, [ebp - 0x124]
push eax
push ebx
push esi
lea ecx, [ebp - 0x134]
push ecx
mov byte [ebp - 4], 3
call fcn.0111f5a0
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x134]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x1120334
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x120]
cmp eax, esi
jge 0x11203ec
cmp eax, 0x80070002
je 0x11203ea
call fcn.01127f00
test al, al
je 0x112037f
test bl, bl
mov eax, dword [0x115f54c]
jne 0x1120364
mov eax, dword [0x115f550]
mov ecx, dword [ebp - 0x120]
push eax
push ecx
push 0x1025db0
push 0x1066e38
push esi
call fcn.01128b70
add esp, 0x14
mov eax, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
mov esi, eax
mov byte [ebp - 4], 1
call fcn.01075230
mov eax, dword [ebp - 0x124]
test eax, eax
je 0x11203a7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x11203ca
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.010840d6
mov esp, ebp
pop ebp
ret 8
cmp eax, esi
jne 0x11204d5
mov ebx, dword [ebp - 0x124]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1120437
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1120420
call esi
mov dword [ebp - 0x120], eax
jmp 0x1120385
call esi
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x120], eax
jmp 0x1120385
test esi, esi
je 0x11204d5
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
lea edx, [esi + 1]
sub eax, edx
or eax, ecx
jge 0x1120465
push edx
lea ecx, [ebp - 0x128]
call fcn.01080db0
mov edi, dword [ebp - 0x128]
push 0
lea edx, [ebp - 0x130]
push edx
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1120407
test edi, edi
mov eax, dword [ebp - 0x130]
mov byte [edi + eax], 0
jne 0x112048d
xor eax, eax
jmp 0x112049f
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1120492
sub eax, edx
js 0x11204f1
cmp eax, dword [edi - 8]
jg 0x11204f1
mov ecx, dword [ebp - 0x12c]
push ecx
mov dword [edi - 0xc], eax
push edi
mov byte [eax + edi], 0
call fcn.01130360
test eax, eax
mov dword [ebp - 0x120], eax
jl 0x11204cb
cmp eax, 1
jne 0x1120385
mov dword [ebp - 0x120], 0
mov edx, dword [ebp - 0x12c]
push edx
push 0x1066e28
call fcn.01130360
mov dword [ebp - 0x120], eax
jmp 0x1120385
push 0x80070057
call fcn.01071710
int3