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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
xor eax, eax
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
xor ebx, ebx
stosd dword es:[edi], eax
cmp dword [ebp + 0xc], ebx
jne 0x435154
mov eax, 0x80070057
push eax
push 0x2a7
push 0x44cb8a
mov edi, eax
call fcn.004315c0
jmp 0x4353f2
cmp dword [ebp + 8], ebx
jne 0x435166
mov eax, 0x80070057
push eax
push 0x2a8
jmp 0x435143
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jne 0x43517a
mov eax, 0x80070057
push eax
push 0x2a9
jmp 0x435143
xor ecx, ecx
cmp cx, word [eax]
jne 0x43518e
mov eax, 0x80070057
push eax
push 0x2aa
jmp 0x435143
push esi
push ebx
push 0x8000080
push 3
push ebx
push 5
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 0x10], eax
cmp eax, 0xffffffff
jne 0x435204
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov edi, 0xffff
mov esi, 0x80070000
cmp eax, ebx
jle 0x4351c8
and ecx, edi
or ecx, esi
mov edx, 0x80070002
cmp ecx, edx
jne 0x4351d8
mov edi, edx
jmp 0x4353f1
cmp eax, ebx
je 0x43520e
jg 0x4351e2
mov edi, eax
jmp 0x4351e6
and edi, eax
or edi, esi
cmp edi, ebx
jl 0x4351ef
mov edi, 0x80004005
push edi
push 0x2b4
push 0x44cb8a
call fcn.004315c0
jmp 0x4353f1
mov edi, 0xffff
mov esi, 0x80070000
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x43524f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jg 0x43522d
mov edi, eax
jmp 0x435231
and edi, eax
or edi, esi
cmp edi, ebx
jl 0x43523a
mov edi, 0x80004005
push edi
push 0x2b9
push 0x44cb8a
call fcn.004315c0
jmp 0x4353e2
cmp dword [ebp + 0x14], ebx
je 0x43529f
mov ebx, dword [ebp + 0x18]
xor eax, eax
cmp eax, dword [ebp - 8]
jl 0x43526f
jg 0x435265
cmp ebx, dword [ebp - 0xc]
jbe 0x43526f
mov edi, 0x80070057
jmp 0x4353e2
push 1
push eax
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x43529f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x43528f
mov edi, eax
jmp 0x435293
and edi, eax
or edi, esi
test edi, edi
jns 0x43529f
push edi
push 0x2c7
jmp 0x435240
cmp dword [ebp + 0x20], 0
je 0x4352ce
mov esi, dword [ebp + 0x1c]
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x43536b
test esi, esi
jne 0x4352fd
push eax
call fcn.004318fe
and dword [edi], esi
mov eax, dword [ebp + 0xc]
and dword [eax], 0
xor edi, edi
jmp 0x4353e2
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov esi, ecx
xor edx, edx
sub esi, ebx
sub ecx, ebx
sbb eax, edx
mov edx, dword [ebp + 0x1c]
xor edi, edi
cmp edi, eax
jg 0x4352a8
jl 0x4352ed
cmp edx, ecx
jae 0x4352a8
mov edi, 0x8007007a
push edi
push 0x2d9
jmp 0x435240
push 1
push esi
push eax
call fcn.0043178e
test eax, eax
jne 0x43531a
mov edi, 0x8007000e
push edi
push 0x2e7
jmp 0x435240
mov dword [ebp + 0x1c], eax
xor ebx, ebx
and dword [ebp - 4], ebx
and dword [ebp + 0x14], 0
lea eax, [ebp + 0x14]
push eax
push ebx
push esi
call fcn.00431998
mov edi, eax
test edi, edi
js 0x4353d4
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 0x1c]
add eax, ebx
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x435392
add ebx, dword [ebp - 4]
cmp dword [ebp - 4], 0
jne 0x435322
cmp ebx, esi
je 0x4353c3
mov edi, 0x8000ffff
jmp 0x4353d4
test esi, esi
je 0x4352c1
push 1
push esi
call fcn.0043176e
mov dword [ebp + 0x1c], eax
test eax, eax
jne 0x43531d
mov edi, 0x8007000e
push edi
push 0x2f4
jmp 0x435240
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4353a6
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
test edi, edi
js 0x4353b1
mov edi, 0x80004005
push edi
push 0x301
push 0x44cb8a
call fcn.004315c0
jmp 0x4353d4
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
and dword [ebp + 0x1c], 0
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
cmp dword [ebp + 0x1c], 0
je 0x4353e2
push dword [ebp + 0x1c]
call fcn.004318fe
cmp dword [ebp + 0x10], 0xffffffff
je 0x4353f1
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, edi
pop edi
pop ebx
leave
ret 0x1c