Function at 0x4822c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
push esi
xor esi, esi
mov dword [esp + 0xc], esi
call fcn.00481be0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x482664
push ebp
mov ebp, dword [esp + 0x20]
push edi
xor eax, eax
movsx edi, word [ebp + 0xc]
mov al, byte [ebp + 4]
mov dword [esp + 0x10], edi
sub eax, esi
je 0x48242a
sub eax, 2
jne 0x4825e7
mov eax, dword [ebp + 8]
mov ecx, 0x659a20
lea edi, [eax + eax + 0x400]
mov dword [esp + 0x18], edi
call fcn.00475680
cmp edi, eax
jae 0x4825dd
mov ecx, dword [esp + 0x10]
lea esi, [ecx + ecx]
mov ecx, 0x659a20
mov dword [esp + 0x1c], esi
call fcn.00475680
cmp esi, eax
jae 0x4825dd
add edi, esi
mov ecx, 0x659a20
mov dword [esp + 0x10], edi
call fcn.00475680
cmp edi, eax
ja 0x4825dd
push esi
call fcn.00470b90
mov ecx, esi
mov esi, dword [esp + 0x2c]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x24], eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ecx, ebp
call fcn.004b5760
mov edi, dword [esp + 0x24]
mov ecx, ebp
push edi
call fcn.004b56a0
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x80
jl 0x4823b1
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x96
jl 0x4823e6
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x96
jl 0x4823d7
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0xe6
jl 0x4823e6
push 0
call fcn.004328b0
add esp, 4
cmp eax, 3
jl 0x4823f8
mov eax, dword [esp + 0x10]
push eax
push ebx
call fcn.00487e80
mov ecx, eax
call fcn.00487b40
mov ecx, dword [esp + 0x18]
push 0
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll__lseek]
mov esi, dword [esp + 0x28]
push esi
push edi
push ebx
call dword [sym.imp.MSVCRT.dll__write]
push esi
push edi
call fcn.00470be0
add esp, 0x20
mov dword [esp + 0x14], 1
jmp 0x4825e7
mov eax, dword [ebp + 8]
mov edx, dword [esp + 0x28]
mov esi, eax
and eax, 7
shr esi, 3
mov ecx, 0x659a20
add esi, 0x400
mov ebp, eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], 0
call fcn.00475680
cmp esi, eax
jae 0x4825dd
mov ecx, 0x659a20
shr edi, 3
call fcn.00475680
lea ecx, [edi + 1]
cmp ecx, eax
jae 0x4825dd
mov ecx, 0x659a20
add edi, esi
call fcn.00475680
lea edx, [edi + 1]
cmp edx, eax
ja 0x4825dd
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x80
jl 0x4824b4
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x96
jl 0x4824e9
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x96
jl 0x4824da
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0xe6
jl 0x4824e9
push 0
call fcn.004328b0
add esp, 4
cmp eax, 3
jl 0x4824f7
push edi
push ebx
call fcn.00487e80
mov ecx, eax
call fcn.00487b40
push 0
push esi
mov esi, dword [sym.imp.MSVCRT.dll__lseek]
push ebx
call esi
mov edi, dword [sym.imp.MSVCRT.dll__read]
lea eax, [esp + 0x34]
push 4
push eax
push ebx
call edi
neg eax
push 1
push eax
push ebx
call esi
mov eax, dword [esp + 0x34]
add esp, 0x24
xor ecx, ecx
test eax, eax
jbe 0x4825be
xor eax, eax
jmp 0x482534
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov dl, byte [edx]
test byte [eax*4 + 0x659a34], dl
je 0x482556
mov eax, dword [ebp*4 + 0x659a34]
mov edx, dword [esp + 0x28]
or edx, eax
mov dword [esp + 0x28], edx
jmp 0x482569
mov edx, dword [ebp*4 + 0x659a34]
mov eax, dword [esp + 0x28]
not edx
and eax, edx
mov dword [esp + 0x28], eax
inc ecx
inc ebp
mov eax, ecx
mov dword [esp + 0x18], ecx
and eax, 0x80000007
jns 0x48257d
dec eax
or eax, 0xfffffff8
inc eax
mov dword [esp + 0x1c], eax
jne 0x482587
inc dword [esp + 0x24]
cmp ebp, 0x20
jne 0x4825b4
lea eax, [esp + 0x28]
push 4
push eax
push ebx
call dword [sym.imp.MSVCRT.dll__write]
lea ecx, [esp + 0x34]
push 4
push ecx
push ebx
call edi
push 1
push 0xfffffffffffffffc
push ebx
call esi
mov ecx, dword [esp + 0x3c]
add esp, 0x24
xor ebp, ebp
cmp ecx, dword [esp + 0x10]
jb 0x482530
test ebp, ebp
je 0x4825d3
lea edx, [esp + 0x28]
push 4
push edx
push ebx
call dword [sym.imp.MSVCRT.dll__write]
add esp, 0xc
mov dword [esp + 0x14], 1
jmp 0x4825e7
push 0xe
call fcn.0049bfc0
add esp, 4
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
pop edi
cmp eax, 0x80
pop ebp
jl 0x48260f
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x96
jl 0x482644
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0x96
jl 0x482635
call fcn.0047de30
mov ecx, eax
call fcn.0047e5d0
cmp eax, 0xe6
jl 0x482644
push 0
call fcn.004328b0
add esp, 4
cmp eax, 3
jl 0x482650
call fcn.0047e0e0
mov ecx, eax
call fcn.0047e070
push ebx
call dword [sym.imp.MSVCRT.dll__close]
mov eax, dword [esp + 0x10]
add esp, 4
pop esi
pop ebx
add esp, 0x10
ret
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret