Function at 0x466e30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0xc], esi
mov esi, dword [ebp + 8]
mov dword [ebp - 8], ebx
push 0
mov eax, dword [esi + 0xec]
mov ebx, dword [esi + 0x98]
mov dword [ebp - 4], eax
mov eax, ebx
add eax, 0xffffffff
mov edx, dword [esi + 0x9c]
mov ecx, dword [esi + 0xf8]
mov dword [ebp - 0x1c], edx
adc edx, 0xffffffff
push ecx
push edx
push eax
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x20], ecx
call fcn.0048f310
mov ecx, eax
mov edi, edx
test byte [esi + 0x179], 0x40
je 0x466ee0
mov edx, dword [esi + 0xa0]
mov dword [ebp - 0x24], ebx
sub ebx, edx
mov dword [ebp - 0x2c], edx
mov eax, dword [esi + 0xa4]
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x24]
sbb edx, eax
mov dword [ebp - 0x28], eax
jl 0x466ee0
mov edx, ebx
sub edx, dword [esi + 0xa8]
mov edx, dword [ebp - 0x1c]
sbb edx, dword [esi + 0xac]
jge 0x466ee0
mov dword [esi + 0xe8], 0
sub ebx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
push 0
sbb eax, dword [ebp - 0x28]
push dword [ebp - 0x20]
push eax
push ebx
call fcn.0048f310
add eax, dword [esi + 0x38]
mov dword [esi + 0x50], eax
jmp 0x4672e7
push 0
mov dword [ebp - 0x18], ecx
lea edx, [ebp - 0x14]
push edx
push ecx
push dword [esi + 0xe4]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x46742e
mov ebx, dword [ebp - 0x14]
mov edx, 0xffffffff
sub eax, edx
sub ebx, edx
or eax, ebx
je 0x467410
mov edx, 0xffffffff
sub ecx, edx
sub edi, edx
mov dword [esi + 0xe8], 0
or ecx, edi
je 0x4673e1
movzx eax, byte [esi + 0x172]
test eax, 0x80
movzx edx, byte [esi + 0x178]
jne 0x466f5d
test dl, 1
jne 0x466f5d
test dl, 2
je 0x4670f8
mov ebx, dword [esi + 0x80]
test ebx, ebx
je 0x4670f8
mov eax, dword [ebp - 4]
cmp eax, dword [esi + 0x138]
jne 0x4670f8
and edx, 0x80
movzx ecx, byte [esi + 0x179]
mov eax, dword [esi + 0xe4]
shr edx, 7
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], eax
mov ecx, dword [esi + 0x144]
cmp dword [0x4d15a0], 0
je 0x467044
cmp ecx, 2
je 0x466fb3
cmp ecx, 1
jne 0x466fbf
xor edi, edi
mov eax, 0xffffffff
jmp 0x4670e7
test edx, edx
je 0x466fcc
cmp ecx, 0xfffffffa
je 0x467300
test ecx, ecx
je 0x467316
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], eax
test edx, edx
je 0x467001
test byte [ebp - 0x1c], 1
je 0x467001
push dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
call fcn.004a62d0
push dword [ebp - 0x24]
call fcn.004a62f0
mov ecx, dword [ebp - 0x28]
add esp, 8
cmp dword [ebp - 0x2c], 0
je 0x467044
push dword [ebp - 0x24]
push dword [ebp - 4]
push ebx
call fcn.004a62d0
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x46730f
push 0
push dword [ebp - 0x24]
push 2
push 0x4b3050
call fcn.004a62d0
add esp, 0x10
mov byte [edi + ebx], 0xa
inc edi
mov eax, 1
jmp 0x4670e7
mov dword [ebp - 0x28], ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x140]
test eax, eax
mov ecx, dword [ebp - 0x28]
jne 0x467061
mov eax, 0x20000
cmp eax, dword [ebp - 4]
jae 0x46706a
test ecx, ecx
jne 0x467082
push 0
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x28]
jmp 0x4670e7
xor edi, edi
mov dword [ebp - 0x2c], edi
mov edi, ebx
mov ebx, eax
push 0
mov esi, ebx
lea edx, [ebp - 0x28]
push edx
push ebx
push edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4670ca
mov ecx, dword [ebp - 0x28]
add edi, ecx
mov edx, dword [ebp - 4]
add dword [ebp - 0x2c], ecx
sub edx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], edx
mov ecx, dword [ecx + 0x140]
test ecx, ecx
jne 0x4670c4
mov ecx, 0x20000
cmp edx, ecx
ja 0x4670ca
mov ebx, edx
cmp dword [ebp - 4], 0
je 0x467343
cmp esi, dword [ebp - 0x28]
jne 0x467343
test eax, eax
jne 0x46708b
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp + 8]
or byte [esi + 0x177], 0x40
mov edx, 1
jmp 0x46725e
and edx, 0x80
mov ebx, dword [esi + 0xe4]
movzx eax, byte [esi + 0x179]
shr edx, 7
mov dword [ebp - 0x20], ebx
mov ebx, dword [esi + 0x38]
mov dword [ebp - 0x24], eax
mov edi, dword [esi + 0x144]
cmp dword [0x4d15a0], 0
je 0x4671bf
cmp edi, 2
je 0x467134
cmp edi, 1
jne 0x467140
xor edi, edi
mov eax, 0xffffffff
jmp 0x46725c
test edx, edx
je 0x46714d
cmp edi, 0xfffffffa
je 0x46734e
test edi, edi
je 0x467367
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], eax
test edx, edx
je 0x46717c
test byte [ebp - 0x24], 1
je 0x46717c
push dword [ebp - 0x28]
call fcn.004a62d0
push dword [ebp - 0x28]
call fcn.004a62f0
add esp, 8
cmp dword [ebp - 0x2c], 0
je 0x4671bf
push dword [ebp - 0x28]
push dword [ebp - 4]
push ebx
call fcn.004a62d0
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x467360
push 0
push dword [ebp - 0x28]
push 2
push 0x4b3050
call fcn.004a62d0
add esp, 0x10
mov byte [edi + ebx], 0xa
inc edi
mov eax, 1
jmp 0x46725c
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x140]
test eax, eax
jne 0x4671d6
mov eax, 0x20000
cmp eax, dword [ebp - 4]
jae 0x4671df
test edi, edi
jne 0x4671f7
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x24]
jmp 0x46725c
xor edi, edi
mov dword [ebp - 0x2c], edi
mov edi, ebx
mov ebx, eax
push 0
mov esi, ebx
lea edx, [ebp - 0x24]
push edx
push ebx
push edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46723f
mov ecx, dword [ebp - 0x24]
add edi, ecx
mov edx, dword [ebp - 4]
add dword [ebp - 0x2c], ecx
sub edx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], edx
mov ecx, dword [ecx + 0x140]
test ecx, ecx
jne 0x467239
mov ecx, 0x20000
cmp edx, ecx
ja 0x46723f
mov ebx, edx
cmp dword [ebp - 4], 0
je 0x4673d6
cmp esi, dword [ebp - 0x24]
jne 0x4673d6
test eax, eax
jne 0x467200
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp + 8]
xor edx, edx
test eax, eax
je 0x4673ac
test edi, edi
je 0x46739a
test byte [esi + 0x170], 1
je 0x467284
cmp byte [esi + 0x15d], 2
je 0x46738e
test edx, edx
jne 0x4672e7
mov eax, dword [esi + 0xf8]
xor edx, edx
mov dword [ebp - 0x2c], eax
mov eax, edi
mov edi, dword [ebp - 0x2c]
div edi
mov ecx, dword [esi + 0x38]
mov dword [esi + 0x50], ecx
mov ecx, dword [esi + 0x98]
add eax, ecx
mov ebx, dword [esi + 0x9c]
mov edx, ebx
adc edx, 0
mov dword [esi + 0xa0], ecx
sub ecx, eax
mov dword [esi + 0xa4], ebx
sub ebx, edx
or ecx, ebx
jne 0x4672db
add eax, 1
mov dword [esi + 0xa8], eax
adc edx, 0
mov dword [esi + 0xac], edx
jmp 0x4672e7
mov dword [esi + 0xa8], eax
mov dword [esi + 0xac], edx
xor eax, eax
mov dword [esi + 0x108], 0
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], 1
jmp 0x466fe2
xor eax, eax
jmp 0x4670e7
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edx
call fcn.004a62f0
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
cmp dword [0x4d15a0], 0
je 0x467007
mov dword [ebp - 0x2c], 1
jmp 0x466fde
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp + 8]
jmp 0x4670e7
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 1
jmp 0x467163
xor eax, eax
jmp 0x46725c
mov dword [ebp - 0x2c], edx
call fcn.004a62f0
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
cmp dword [0x4d15a0], 0
je 0x467182
mov dword [ebp - 0x2c], 1
jmp 0x46715f
mov eax, dword [esi + 0x38]
test byte [eax], 0xbf
jne 0x467284
mov eax, 0x24
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x24
cmp eax, 0x26
mov dword [esi + 0xe8], eax
je 0x4673c7
mov edx, 0x27
mov eax, edx
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp + 8]
jmp 0x46725c
mov eax, dword [esi + 0x9c]
mov ecx, dword [esi + 0xa0]
mov edi, dword [esi + 0xa4]
mov edx, dword [esi + 0xf8]
mov ebx, dword [esi + 0x98]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], edi
jmp 0x466ec0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xe8], eax
mov eax, 0x27
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x24], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x24]
test eax, eax
je 0x46744b
mov eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
jmp 0x467410
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
jmp 0x466f0e