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

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
mov esi, dword [esp + 0x54]
xor ebx, ebx
push edi
cmp esi, ebx
jne 0x4570fb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
push esi
call fcn.00459710
add esp, 4
test eax, eax
jne 0x457110
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [esi]
mov dword [esp + 0x1c], ebx
cmp eax, 1
jne 0x4573a0
mov edi, dword [esi + 4]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push ebx
push ebx
push edi
call ebp
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
jne 0x45714a
push 2
push ebx
push ebx
push edi
call ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov cl, byte [esp + 0x58]
sub eax, esi
xor edx, edx
cmp eax, ebx
mov dword [esp + 0x20], eax
mov byte [esp + 0x40], cl
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x28], ebx
jle 0x457365
mov edx, eax
mov dword [esp + 0x24], edx
push 0x1000
call fcn.0045cd7e
mov ecx, dword [esp + 0x28]
add esp, 4
cmp ecx, 0x1000
mov dword [esp + 0x38], eax
jl 0x4571a2
mov ecx, 0x1000
lea edx, [esp + 0x18]
push 0
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4572e3
mov ecx, dword [esp + 0x18]
xor ebp, ebp
xor esi, esi
test ecx, ecx
jbe 0x45727d
mov edx, dword [esp + 0x38]
mov al, byte [esi + edx]
test al, al
je 0x4571e7
cmp al, 0xa
je 0x45720a
cmp al, 0xd
je 0x45722f
inc esi
cmp esi, ecx
jb 0x4571ce
jmp 0x45727d
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], esi
add esi, ebx
push 0
add esi, edx
push 0
push esi
push edi
mov ebp, 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x18]
jmp 0x45727d
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], esi
add esi, ebx
push 0
push 0
mov ebp, 1
lea ecx, [esi + eax + 1]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x18]
jmp 0x45727d
lea eax, [esi + 1]
cmp eax, ecx
jne 0x4572cb
lea ecx, [esp + 0x18]
push 0
push ecx
lea edx, [esp + 0x60]
push 1
push edx
push edi
mov byte [esp + 0x6c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x58], 0xa
je 0x457272
mov ecx, dword [esp + 0x14]
lea eax, [esi + ebx]
push 0
push 0
lea edx, [eax + ecx + 1]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, esi
mov ebp, 1
mov dword [esp + 0x18], ecx
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], ecx
add ebx, ecx
mov ecx, dword [esp + 0x48]
push eax
push 1
push ecx
lea ecx, [esp + 0x4c]
call fcn.00457900
test ebp, ebp
jne 0x4572fd
mov eax, dword [esp + 0x18]
mov ecx, 0x1000
cmp eax, ecx
jne 0x4572fd
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
add eax, ecx
sub edx, ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], eax
cmp eax, ecx
mov dword [esp + 0x24], edx
jl 0x457180
jmp 0x4572fd
cmp byte [esi + edx + 1], 0xa
jne 0x45725b
mov ecx, dword [esp + 0x14]
lea eax, [esi + ebx]
push 0
push 0
lea edx, [eax + ecx + 2]
jmp 0x45726a
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x38]
push edx
call fcn.0045ca86
add esp, 4
test ebx, ebx
jle 0x457361
lea eax, [ebx + 1]
push eax
call fcn.004526b0
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
add esp, 4
cmp ebp, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x58], eax
je 0x45735d
mov ecx, dword [ebp + 4]
mov eax, dword [esp + 0x58]
mov esi, dword [ebp]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, dword [ebp + 4]
mov dword [esp + 0x58], eax
mov eax, dword [ebp]
push eax
call fcn.0045ca86
mov eax, dword [esp + 0x4c]
add ebp, 8
add esp, 4
cmp ebp, eax
jne 0x457321
mov eax, dword [esp + 0x1c]
mov byte [ebx + eax], 0
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
mov eax, edx
cmp eax, edx
je 0x457383
mov esi, dword [eax]
add eax, 8
mov dword [ecx], esi
mov esi, dword [eax - 4]
mov dword [ecx + 4], esi
add ecx, 8
cmp eax, edx
jne 0x45736f
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00467d54
mov eax, dword [esp + 0x20]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
cmp eax, 2
jne 0x457437
mov esi, dword [esi + 4]
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x14]
lea ecx, [esp + 0x34]
lea edx, [esp + 0x58]
push ecx
mov dword [esp + 0x34], eax
mov eax, dword [esi]
push edx
push 0xffffffffffffffff
push ebx
mov ecx, esi
call dword [eax + 0x30]
mov ebp, dword [esp + 0x58]
xor edi, edi
test eax, eax
jle 0x4573e8
mov cl, byte [ebp]
cmp cl, 0xd
je 0x4573e8
cmp cl, 0xa
je 0x4573e8
inc edi
inc ebp
cmp edi, eax
jl 0x4573d5
lea eax, [edi + 1]
push eax
call fcn.004526b0
mov ecx, dword [esp + 0x34]
mov ebx, eax
mov al, byte [ebp]
add esp, 4
add ecx, edi
cmp al, 0xd
je 0x457407
cmp al, 0xa
jne 0x457410
mov al, byte [ebp + 1]
inc ecx
cmp al, 0xa
jne 0x457410
inc ecx
mov edx, dword [esi]
push 0
push ecx
mov ecx, esi
call dword [edx + 0x18]
mov eax, dword [esp + 0x58]
push edi
push eax
push ebx
call fcn.0045cc80
add esp, 0xc
mov byte [edi + ebx], 0
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x40
ret
cmp eax, 3
jne 0x45742d
mov ecx, dword [esp + 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor ebp, ebp
push 1
mov ebx, dword [ecx + 4]
push ebp
push ebp
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x20], esi
jne 0x45746e
push 2
push ebp
push ebp
push ebx
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dl, byte [esp + 0x58]
sub eax, esi
cmp eax, ebp
mov dword [esp + 0x30], eax
mov byte [esp + 0x40], dl
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], ebp
jle 0x4578b1
mov dword [esp + 0x28], eax
push 0x1000
call fcn.0045cd7e
add esp, 4
mov dword [esp + 0x38], eax
push 1
push 0
push 0
push ebx
call edi
mov esi, eax
mov eax, dword [esp + 0x28]
cmp eax, 0x1000
jl 0x4574d0
mov eax, 0x1000
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x14]
push 0
push ecx
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x457837
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x24], 0
lea ebp, [ecx + 0x10]
lea eax, [ecx + 0x34]
mov ecx, dword [ecx + 0xc]
push ebp
push ecx
push eax
mov eax, dword [esp + 0x44]
push edx
push eax
push esi
call fcn.00458fc0
mov ecx, dword [esp + 0x2c]
add esp, 0x18
xor esi, esi
test ecx, ecx
jbe 0x457621
mov edx, dword [esp + 0x38]
mov al, byte [esi + edx]
test al, al
je 0x457542
cmp al, 0xa
je 0x45756b
cmp al, 0xd
je 0x457596
inc esi
cmp esi, ecx
jb 0x457529
jmp 0x457621
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x14], esi
add esi, ecx
push 0
add esi, edx
push 0
push esi
push ebx
mov dword [esp + 0x34], 1
call edi
mov ecx, dword [esp + 0x14]
jmp 0x457621
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], esi
add esi, edx
push 0
push 0
lea ecx, [esi + eax + 1]
mov dword [esp + 0x2c], 1
push ecx
push ebx
call edi
mov ecx, dword [esp + 0x14]
jmp 0x457621
lea eax, [esi + 1]
cmp eax, ecx
jne 0x457666
push 1
push 0
push 0
push ebx
mov byte [esp + 0x23], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x1b]
push 1
push edx
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x14]
push ebp
mov ecx, dword [eax + 0xc]
add eax, 0x34
push ecx
push eax
lea eax, [esp + 0x1f]
push edx
push eax
push edi
call fcn.00458fc0
mov al, byte [esp + 0x2b]
add esp, 0x18
cmp al, 0xa
je 0x45760d
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push 0
push 0
lea edx, [esi + ecx]
lea ecx, [edx + eax + 1]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, esi
mov dword [esp + 0x24], 1
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], ecx
add esi, ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], esi
sub ecx, eax
mov esi, eax
sar ecx, 3
cmp ecx, 1
jae 0x45774a
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x45769f
sub eax, ecx
sar eax, 3
cmp eax, 1
jbe 0x45769f
lea ecx, [esp + 0x40]
call fcn.00457b50
mov edi, eax
jmp 0x4576a4
mov al, byte [esi + edx + 1]
push 0
cmp al, 0xa
push 0
jne 0x457687
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
lea eax, [esi + edx]
lea edx, [eax + ecx + 2]
push edx
push ebx
call edi
jmp 0x457613
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
lea ecx, [esi + eax]
lea eax, [ecx + edx + 1]
push eax
push ebx
call edi
jmp 0x457613
mov edi, 1
lea ecx, [esp + 0x40]
call fcn.00457b50
add eax, edi
mov dword [esp + 0x34], eax
jns 0x4576b7
xor eax, eax
lea edx, [eax*8]
push edx
call fcn.00467d2b
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x40]
push edi
push esi
push eax
call fcn.00457b70
lea ecx, [esp + 0x38]
mov ebp, eax
push ecx
push 1
push ebp
lea ecx, [esp + 0x4c]
call fcn.00457bb0
mov edx, dword [esp + 0x48]
add ebp, 8
push ebp
push edx
push esi
lea ecx, [esp + 0x4c]
call fcn.00457b70
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push eax
push ecx
lea ecx, [esp + 0x48]
call fcn.004578f0
mov edx, dword [esp + 0x44]
push edx
call fcn.00467d54
mov eax, dword [esp + 0x38]
add esp, 4
lea ecx, [edi + eax*8]
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0x40]
call fcn.00457b50
lea edx, [edi + eax*8 + 8]
mov dword [esp + 0x44], edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x48], edx
jmp 0x457800
xor ecx, ecx
mov dword [esp + 0x34], ecx
sar ecx, 3
cmp ecx, 1
jae 0x4577a9
lea ecx, [eax + 8]
push ecx
push eax
push eax
lea ecx, [esp + 0x4c]
call fcn.00457b70
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x38]
mov ecx, eax
push edx
sub ecx, esi
mov edx, 1
sar ecx, 3
sub edx, ecx
lea ecx, [esp + 0x44]
push edx
push eax
call fcn.00457bb0
mov ecx, dword [esp + 0x48]
mov eax, esi
cmp esi, ecx
je 0x4577fb
mov edx, dword [esp + 0x38]
mov dword [eax], edx
mov edx, dword [esp + 0x3c]
mov dword [eax + 4], edx
add eax, 8
cmp eax, ecx
jne 0x457793
jmp 0x4577fb
lea ecx, [eax - 8]
push eax
push eax
mov dword [esp + 0x3c], ecx
push ecx
lea ecx, [esp + 0x4c]
call fcn.00457b70
mov eax, dword [esp + 0x48]
mov ecx, eax
add eax, 0xfffffff8
cmp esi, eax
je 0x4577de
mov edx, dword [eax - 8]
sub eax, 8
sub ecx, 8
cmp eax, esi
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
jne 0x4577c9
lea ecx, [esi + 8]
mov eax, esi
cmp esi, ecx
je 0x4577fb
mov edx, dword [esp + 0x38]
mov dword [eax], edx
mov edx, dword [esp + 0x3c]
mov dword [eax + 4], edx
add eax, 8
cmp eax, ecx
jne 0x4577e7
add dword [esp + 0x48], 8
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x45784d
mov eax, dword [esp + 0x14]
mov ecx, 0x1000
cmp eax, ecx
jne 0x45784d
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
add eax, ecx
sub edx, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x2c], eax
cmp eax, ecx
mov dword [esp + 0x28], edx
jl 0x4574a4
jmp 0x45784d
push 2
push 0
push 0
push ebx
call edi
mov eax, dword [esp + 0x38]
push eax
call fcn.0045ca86
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4578b1
mov ecx, eax
inc ecx
push ecx
call fcn.004526b0
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
add esp, 4
cmp ebp, ecx
mov dword [esp + 0x1c], eax
mov ebx, eax
je 0x4578a9
mov ecx, dword [ebp + 4]
mov esi, dword [ebp]
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp]
mov edi, dword [ebp + 4]
push eax
add ebx, edi
call fcn.0045ca86
mov eax, dword [esp + 0x4c]
add ebp, 8
add esp, 4
cmp ebp, eax
jne 0x457873
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov byte [ecx + eax], 0
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
cmp eax, eax
mov edx, eax
je 0x4578d3
mov esi, dword [eax]
add eax, 8
mov dword [ecx], esi
mov esi, dword [eax - 4]
mov dword [ecx + 4], esi
add ecx, 8
cmp eax, edx
jne 0x4578bf
mov edx, dword [esp + 0x44]
mov dword [esp + 0x48], ecx
push edx
call fcn.00467d54
mov eax, dword [esp + 0x20]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret