Function at 0x4de270
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 0x4de28b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
push esi
call fcn.004e1e10
add esp, 4
test eax, eax
jne 0x4de2a0
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 0x4de530
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 0x4de2da
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 0x4de4f5
mov edx, eax
mov dword [esp + 0x24], edx
push 0x1000
call fcn.004ede80
mov ecx, dword [esp + 0x28]
add esp, 4
cmp ecx, 0x1000
mov dword [esp + 0x38], eax
jl 0x4de332
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 0x4de473
mov ecx, dword [esp + 0x18]
xor ebp, ebp
xor esi, esi
test ecx, ecx
jbe 0x4de40d
mov edx, dword [esp + 0x38]
mov al, byte [esi + edx]
test al, al
je 0x4de377
cmp al, 0xa
je 0x4de39a
cmp al, 0xd
je 0x4de3bf
inc esi
cmp esi, ecx
jb 0x4de35e
jmp 0x4de40d
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 0x4de40d
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 0x4de40d
lea eax, [esi + 1]
cmp eax, ecx
jne 0x4de45b
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 0x4de402
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.004dd710
test ebp, ebp
jne 0x4de48d
mov eax, dword [esp + 0x18]
mov ecx, 0x1000
cmp eax, ecx
jne 0x4de48d
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 0x4de310
jmp 0x4de48d
cmp byte [esi + edx + 1], 0xa
jne 0x4de3eb
mov ecx, dword [esp + 0x14]
lea eax, [esi + ebx]
push 0
push 0
lea edx, [eax + ecx + 2]
jmp 0x4de3fa
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x38]
push edx
call fcn.004edd11
add esp, 4
test ebx, ebx
jle 0x4de4f1
lea eax, [ebx + 1]
push eax
call fcn.004d70f0
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 0x4de4ed
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.004edd11
mov eax, dword [esp + 0x4c]
add ebp, 8
add esp, 4
cmp ebp, eax
jne 0x4de4b1
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 0x4de513
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 0x4de4ff
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x44]
push ecx
call fcn.004fc50c
mov eax, dword [esp + 0x20]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
cmp eax, 2
jne 0x4de5c7
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 0x4de578
mov cl, byte [ebp]
cmp cl, 0xd
je 0x4de578
cmp cl, 0xa
je 0x4de578
inc edi
inc ebp
cmp edi, eax
jl 0x4de565
lea eax, [edi + 1]
push eax
call fcn.004d70f0
mov ecx, dword [esp + 0x34]
mov ebx, eax
mov al, byte [ebp]
add esp, 4
add ecx, edi
cmp al, 0xd
je 0x4de597
cmp al, 0xa
jne 0x4de5a0
mov al, byte [ebp + 1]
inc ecx
cmp al, 0xa
jne 0x4de5a0
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.004ee0c0
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 0x4de5bd
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 0x4de5fe
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 0x4dea41
mov dword [esp + 0x28], eax
push 0x1000
call fcn.004ede80
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 0x4de660
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 0x4de9c7
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.004e1800
mov ecx, dword [esp + 0x2c]
add esp, 0x18
xor esi, esi
test ecx, ecx
jbe 0x4de7b1
mov edx, dword [esp + 0x38]
mov al, byte [esi + edx]
test al, al
je 0x4de6d2
cmp al, 0xa
je 0x4de6fb
cmp al, 0xd
je 0x4de726
inc esi
cmp esi, ecx
jb 0x4de6b9
jmp 0x4de7b1
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 0x4de7b1
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 0x4de7b1
lea eax, [esi + 1]
cmp eax, ecx
jne 0x4de7f6
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.004e1800
mov al, byte [esp + 0x2b]
add esp, 0x18
cmp al, 0xa
je 0x4de79d
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 0x4de8da
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x4de82f
sub eax, ecx
sar eax, 3
cmp eax, 1
jbe 0x4de82f
lea ecx, [esp + 0x40]
call fcn.004dea90
mov edi, eax
jmp 0x4de834
mov al, byte [esi + edx + 1]
push 0
cmp al, 0xa
push 0
jne 0x4de817
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 0x4de7a3
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 0x4de7a3
mov edi, 1
lea ecx, [esp + 0x40]
call fcn.004dea90
add eax, edi
mov dword [esp + 0x34], eax
jns 0x4de847
xor eax, eax
lea edx, [eax*8]
push edx
call fcn.004fc4e3
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x40]
push edi
push esi
push eax
call fcn.004deab0
lea ecx, [esp + 0x38]
mov ebp, eax
push ecx
push 1
push ebp
lea ecx, [esp + 0x4c]
call fcn.004deaf0
mov edx, dword [esp + 0x48]
add ebp, 8
push ebp
push edx
push esi
lea ecx, [esp + 0x4c]
call fcn.004deab0
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push eax
push ecx
lea ecx, [esp + 0x48]
call fcn.004dea80
mov edx, dword [esp + 0x44]
push edx
call fcn.004fc50c
mov eax, dword [esp + 0x38]
add esp, 4
lea ecx, [edi + eax*8]
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0x40]
call fcn.004dea90
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 0x4de990
xor ecx, ecx
mov dword [esp + 0x34], ecx
sar ecx, 3
cmp ecx, 1
jae 0x4de939
lea ecx, [eax + 8]
push ecx
push eax
push eax
lea ecx, [esp + 0x4c]
call fcn.004deab0
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.004deaf0
mov ecx, dword [esp + 0x48]
mov eax, esi
cmp esi, ecx
je 0x4de98b
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 0x4de923
jmp 0x4de98b
lea ecx, [eax - 8]
push eax
push eax
mov dword [esp + 0x3c], ecx
push ecx
lea ecx, [esp + 0x4c]
call fcn.004deab0
mov eax, dword [esp + 0x48]
mov ecx, eax
add eax, 0xfffffff8
cmp esi, eax
je 0x4de96e
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 0x4de959
lea ecx, [esi + 8]
mov eax, esi
cmp esi, ecx
je 0x4de98b
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 0x4de977
add dword [esp + 0x48], 8
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4de9dd
mov eax, dword [esp + 0x14]
mov ecx, 0x1000
cmp eax, ecx
jne 0x4de9dd
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 0x4de634
jmp 0x4de9dd
push 2
push 0
push 0
push ebx
call edi
mov eax, dword [esp + 0x38]
push eax
call fcn.004edd11
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4dea41
mov ecx, eax
inc ecx
push ecx
call fcn.004d70f0
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 0x4dea39
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.004edd11
mov eax, dword [esp + 0x4c]
add ebp, 8
add esp, 4
cmp ebp, eax
jne 0x4dea03
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 0x4dea63
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 0x4dea4f
mov edx, dword [esp + 0x44]
mov dword [esp + 0x48], ecx
push edx
call fcn.004fc50c
mov eax, dword [esp + 0x20]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret