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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f6851
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x1c]
push eax
call fcn.004430e8
cmp eax, ebx
jl 0x57ec9e
mov edi, dword [ebp - 0x1c]
mov ecx, dword [edi]
lea edx, [ebp - 0x38]
push edx
push 0x638840
push edi
mov eax, dword [ecx]
call eax
cmp eax, ebx
jl 0x57ec93
mov dword [ebp - 0x34], edi
jmp 0x57ec9e
mov edx, dword [edi]
push 1
mov ecx, edi
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 4], ebx
mov ecx, dword [ebp - 0x34]
add ecx, 0xc
mov dword [ebp - 0x1c], ecx
push 0x7c
push esi
call fcn.004250a4
add esp, 8
mov edi, eax
cmp edi, ebx
je 0x57efd9
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 1
mov ecx, 0x6bbe20
mov edx, dword [0x6bbe20]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
mov ecx, edi
sub ecx, esi
sar ecx, 1
push ecx
push esi
lea eax, [ebp - 0x18]
call fcn.004496c2
add edi, 2
mov eax, dword [0x6bdb60]
mov edx, dword [eax]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x18]
push ecx
push eax
mov edx, dword [edx + 0x60]
call edx
mov esi, eax
cmp esi, ebx
jge 0x57ed6d
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57ed31
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x57ed43
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57ed59
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 0xc]
call edx
mov esi, eax
mov dword [ebp - 0x2c], esi
mov eax, dword [esi]
push edi
push esi
mov ecx, dword [eax + 0x14]
call ecx
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x57edf0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x57edb1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x57edc3
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57edd9
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov ecx, dword [ebp - 0x24]
push ecx
push esi
mov edx, dword [eax + 0x1c]
call edx
mov edi, eax
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], 3
lea eax, [edi + 2]
mov dword [ebp - 0x40], eax
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
cmp ecx, ebx
ja 0x57ee19
cmp eax, 0xffffffff
jbe 0x57ee23
push 0x80070216
call fcn.004a3cf3
cmp eax, 0x80
jbe 0x57ee3d
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00427501
mov dword [ebp - 4], 2
jmp 0x57ee63
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 4]
mov dword [eax], ecx
mov dword [ebp - 4], 2
jmp 0x57ee63
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
cmp eax, ebx
jne 0x57eece
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57ee8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x57eea1
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57eeb7
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, 0x8007000e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
push edi
push eax
mov edx, dword [ebp - 0x24]
push edx
push esi
mov eax, dword [ecx + 0x24]
call eax
mov esi, eax
cmp esi, ebx
jge 0x57ef45
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57ef05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x57ef17
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57ed59
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
mov byte [eax + edi], bl
mov eax, dword [ecx]
mov byte [eax + edi + 1], bl
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x90], edi
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x57ef76
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x14], ebx
mov dword [eax], ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x57ef99
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x57efab
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57ed59
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 5
cmp edi, 0xffffffff
jne 0x57f043
call fcn.004a6977
mov esi, eax
mov byte [ebp - 4], bl
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57ed59
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x24], ebx
je 0x57f098
mov byte [ebp - 4], bl
cmp edi, ebx
je 0x57f067
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57edd9
mov ecx, dword [eax]
push eax
mov edx, dword [ecx + 8]
call edx
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xffffffff
jne 0x57f0b5
call fcn.004a6977
mov esi, eax
mov byte [ebp - 4], bl
cmp edi, ebx
je 0x57f015
push edi
jmp 0x57f00c
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x28]
add eax, 2
push eax
mov esi, dword [ebp - 0x1c]
call fcn.00427078
mov dword [ebp - 4], 5
jmp 0x57f0e3
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ecx]
cmp esi, ebx
jne 0x57f12a
mov byte [ebp - 4], bl
cmp edi, ebx
je 0x57f0fd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57f113
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, 0x8007000e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x2c], ebx
push ebx
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x28]
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x57f09d
mov eax, dword [ebp - 0x28]
mov byte [esi + eax], bl
mov ecx, dword [ebp - 0x28]
mov byte [esi + ecx + 1], bl
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x28]
mov dword [edx + 0x90], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov byte [ebp - 4], bl
cmp edi, ebx
je 0x57f17b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x57f191
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret