Function at 0x823d8c0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x168]
sub esp, 0x14
sub eax, 0
push ebx
push edi
je 0x823d992
sub eax, 1
je 0x823d98c
sub eax, 2
jne 0x823d997
cmp dword [esi + 0x7c], eax
jne 0x823d90f
push eax
push eax
push 0x27
push eax
push eax
push eax
add edx, 8
push edx
call fcn.0822a430
add esp, 0x1c
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x60]
mov edx, dword [esi + 0x6c]
mov edi, dword [eax + 4]
sub edi, edx
cmp edi, ecx
mov ebx, ecx
jg 0x823d922
mov ebx, edi
test ebx, ebx
je 0x823d96f
mov eax, dword [eax]
add eax, edx
push 0
push eax
mov eax, dword [esi + 0x7c]
push eax
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x823d957
mov eax, dword [ebp + 8]
push 0
push 0x27
push eax
call fcn.08224ab0
add esp, 0xc
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x7c]
mov edx, dword [ebp + 0x10]
push ecx
push 1
push ebx
push edx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test eax, eax
je 0x823d93e
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x823d978
mov dword [eax], ebx
cmp ebx, edi
jl 0x823dade
or dword [esi + 0x70], 1
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edx + 0x2b4]
mov ebx, dword [edx + 0x1c]
jmp 0x823d99a
mov ebx, dword [ebp + 8]
mov edi, dword [esi + 0x6c]
mov eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], edi
test ecx, ecx
je 0x823da4a
jmp 0x823d9b3
mov eax, dword [ebp - 8]
cmp eax, 0xffff
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], ecx
jle 0x823d9c5
mov eax, 0xffff
movsx ecx, word [esi + 0x44]
push edi
lea edx, [ebp - 0x10]
push edx
mov edx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 8]
push eax
movzx eax, word [esi]
push edx
mov edx, dword [ecx]
push eax
push ebx
push edx
call fcn.08230ee0
add esp, 0x20
test eax, eax
jne 0x823da06
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebx + 4]
jne 0x823da22
mov eax, dword [ebp - 0x10]
test eax, eax
jle 0x823da46
add dword [ebp + 0x10], eax
add edi, eax
sub dword [ebp - 8], eax
jne 0x823d9b0
jmp 0x823da4a
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
add eax, 8
push ebx
push eax
call fcn.0822a640
add esp, 0xc
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push 0
push 0
push 0x55
push 0
push 0
add edx, 8
push 0
push edx
call fcn.0822a430
add esp, 0x1c
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
or dword [esi + 0x70], 1
cmp word [ebp + 0xc], 0xfffe
jne 0x823dac5
test byte [esi + 0x70], 1
jne 0x823dac5
movsx edx, word [esi + 0x44]
mov eax, dword [ebx + 4]
push edi
lea ecx, [ebp - 8]
push ecx
movzx ecx, word [esi]
push edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edx]
push ecx
push ebx
push eax
call fcn.08230ee0
add esp, 0x20
test eax, eax
je 0x823da9a
mov ecx, dword [ebp + 8]
push ebx
push ecx
call fcn.0822ac30
add esp, 8
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebx + 4]
je 0x823dabb
mov eax, dword [ebp + 8]
push 0
push 0x55
push eax
call fcn.08224ab0
add esp, 0xc
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 8], 0
jg 0x823dac5
or dword [esi + 0x70], 1
sub edi, dword [ebp - 0x14]
cmp word [esi + 8], 8
jne 0x823dad5
mov ecx, dword [ebp + 0x10]
mov byte [ecx], 0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x823dade
mov dword [eax], edi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret