Function at 0x4ba100
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x228
mov eax, dword [esp + 0x22c]
mov edx, ecx
push ebx
push ebp
movsx ecx, word [eax]
movsx ebx, word [eax + 4]
push esi
mov dword [esp + 0x18], ecx
movsx esi, word [eax + 2]
sub ebx, ecx
push edi
movsx ecx, word [eax + 6]
movsx eax, word [edx + 0x10]
sub ecx, esi
inc ebx
inc ecx
mov dword [esp + 0x24], edx
cmp eax, ecx
mov dword [esp + 0x34], esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], eax
jl 0x4ba148
mov dword [esp + 0x30], ecx
cdq
and edx, 7
mov ecx, dword [esp + 0x24c]
add eax, edx
mov esi, dword [esp + 0x240]
sar eax, 3
xor edi, edi
mov dword [esp + 0x18], esi
lea eax, [eax + eax*2]
mov dword [esp + 0x28], edi
test ecx, ecx
lea eax, [eax*8 + 0x6b5cc0]
mov dword [esp + 0x10], eax
mov ebp, eax
je 0x4ba257
cmp dword [esp + 0x244], 0x100
jge 0x4ba257
mov edx, dword [esp + 0x248]
xor ecx, ecx
mov cl, byte [eax + 4]
mov eax, dword [esp + 0x244]
add ecx, edx
shl ecx, 1
mov edx, ecx
mov ecx, ebx
sub ecx, edx
xor edx, edx
test eax, eax
jle 0x4ba37c
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
cmp word [eax], 0x8000
sbb eax, eax
xor ebx, ebx
inc eax
lea eax, [eax + eax*2]
mov bl, byte [esi + eax*4 + 4]
mov eax, dword [esp + 0x248]
add ebx, eax
add edi, ebx
cmp edi, ecx
jle 0x4ba1f3
mov eax, dword [esp + 0x244]
add eax, 0xfffffffe
cmp edx, eax
jl 0x4ba20c
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x244]
inc edx
add esi, 2
cmp edx, eax
mov dword [esp + 0x14], esi
jl 0x4ba1bd
jmp 0x4ba24b
mov esi, dword [esp + 0x240]
lea eax, [edx + edx]
mov ecx, eax
lea edi, [esp + 0x38]
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
add edx, 2
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x2e
mov dword [esp + 0x244], edx
mov word [esp + eax + 0x38], cx
mov word [esp + eax + 0x3a], cx
lea ecx, [esp + 0x38]
mov dword [esp + 0x18], ecx
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x244]
test ecx, ecx
jle 0x4ba37c
jmp 0x4ba26c
mov eax, dword [esp + 0x10]
test ebx, ebx
jle 0x4ba37c
mov ecx, dword [esp + 0x18]
xor esi, esi
mov si, word [ecx]
add ecx, 2
cmp edi, esi
mov dword [esp + 0x18], ecx
je 0x4ba2d9
cmp esi, 0x8000
lea ebp, [eax + 0xc]
jae 0x4ba295
mov ebp, eax
mov edx, esi
xor eax, eax
mov al, byte [ebp + 5]
and edx, 0x7fff
imul edx, eax
mov eax, dword [ebp]
mov ecx, dword [0x659a18]
add edx, eax
push 0
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [0x659a18]
xor eax, eax
mov al, byte [ebp + 5]
push edx
push eax
push 1
push 0x6598ac
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov edi, esi
xor eax, eax
mov al, byte [ebp + 4]
cmp eax, ebx
jl 0x4ba2e4
mov eax, ebx
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push ecx
push eax
mov eax, dword [esp + 0x24]
push edx
push eax
lea ecx, [esp + 0x38]
call fcn.004b4a60
cmp byte [ebp + 7], 1
jbe 0x4ba326
push ebp
call fcn.00471dd0
mov eax, dword [esp + 0x28]
add esp, 4
xor ecx, ecx
lea edx, [esp + 0x28]
mov cl, byte [ebp + 6]
push ecx
mov ecx, dword [eax + 0xc]
push edx
push ecx
push 0x6578ac
jmp 0x4ba33e
mov ecx, dword [esp + 0x24]
xor edx, edx
mov dl, byte [ebp + 6]
lea eax, [esp + 0x28]
push edx
mov edx, dword [ecx + 0xc]
push eax
push edx
push 0x6598ac
mov ecx, 0x673490
call fcn.00499fc0
mov ecx, dword [esp + 0x248]
xor eax, eax
mov al, byte [ebp + 4]
mov esi, dword [esp + 0x1c]
lea edx, [eax + ecx]
add eax, ecx
sub ebx, eax
mov eax, dword [esp + 0x244]
add esi, edx
dec eax
test eax, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x244], eax
jg 0x4ba268
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret 0x14