Function at 0x470880
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [esp + 0x30]
mov dword [esp], ebx
call fcn.00464860
cmp byte [ebx + 0x158], 0
je 0x470514
mov ecx, dword [ebx + 0x80]
mov eax, dword [ebx + 0x108]
test cl, 2
je 0x470703
mov dword [ebx + 0x10c], eax
movzx edx, byte [ebx + 0x159]
mov esi, dword [ebx + 0x104]
movzx edi, byte [edx + 0x540a98]
movzx edx, byte [edx + 0x540a91]
lea eax, [esi + edi - 1]
sub eax, edx
xor edx, edx
div edi
mov dword [ebx + 0x118], eax
jmp 0x470532
mov eax, dword [ebx + 0x108]
mov esi, dword [ebx + 0x104]
mov ecx, dword [ebx + 0x80]
mov dword [ebx + 0x10c], eax
mov dword [ebx + 0x118], esi
test cl, 4
movzx edx, byte [ebx + 0x15e]
je 0x47054d
cmp byte [ebx + 0x15c], 7
mov eax, 8
cmovbe edx, eax
test ch, 0x10
jne 0x470691
test ch, 2
jne 0x4707c0
nop
mov eax, ecx
and eax, 0x8000
mov ebp, eax
je 0x47058c
movzx edi, byte [ebx + 0x15b]
mov eax, edi
test al, al
jne 0x470714
cmp edx, 8
mov edi, 0x20
mov edx, 0x10
cmovg edx, edi
test ch, 0x40
je 0x4705b8
cmp word [ebx + 0x154], 0
je 0x4706d0
test ch, 0x10
je 0x4706d0
cmp edx, 0x10
mov eax, 0x20
mov edx, 0x40
cmovle edx, eax
and ecx, 0x100000
je 0x4705d0
movzx ecx, byte [ebx + 0x74]
movzx eax, byte [ebx + 0x75]
imul ecx, eax
cmp edx, ecx
cmovl edx, ecx
lea eax, [esi + 7]
and eax, 0xfffffff8
cmp edx, 7
mov byte [ebx + 0x162], dl
mov byte [ebx + 0x163], 0
jle 0x470683
mov ecx, edx
shr ecx, 3
imul ecx, eax
lea eax, [ecx + 1]
add edx, 7
sar edx, 3
lea esi, [eax + edx + 0x30]
cmp esi, dword [ebx + 0x2b8]
ja 0x470736
mov eax, dword [ebx + 0x114]
cmp eax, 0xffffffff
je 0x47086a
mov edx, dword [ebx + 0x124]
add eax, 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
call sub.msvcrt.dll_memset
mov eax, dword [ebx + 0x2bc]
test eax, eax
je 0x470663
mov dword [ebx + 0x2c0], 0
mov dword [ebx + 0x2bc], 0
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0046ba50
mov edx, 0x49444154
mov eax, ebx
call fcn.0046be00
test eax, eax
jne 0x470858
or dword [ebx + 0x7c], 0x40
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
imul eax, edx
shr eax, 3
add eax, 1
jmp 0x4705f7
movzx eax, byte [ebx + 0x15b]
cmp al, 3
je 0x470800
test al, al
je 0x4707d0
cmp al, 2
je 0x470830
test ch, 2
je 0x470560
cmp byte [ebx + 0x15c], 0xf
lea eax, [edx + edx]
cmovbe edx, eax
jmp 0x470560
test ebp, ebp
jne 0x4705a8
movzx eax, byte [ebx + 0x15b]
cmp al, 4
je 0x4705a8
cmp edx, 8
jg 0x470815
xor edx, edx
cmp al, 6
sete dl
lea edx, [edx*8 + 0x18]
jmp 0x4705b8
add eax, 7
shr eax, 3
mov dword [ebx + 0x10c], eax
jmp 0x4704e7
sub edi, 2
mov eax, edi
cmp al, 1
ja 0x47058c
cmp edx, 0x20
mov edi, 0x40
mov edx, 0x20
cmovg edx, edi
jmp 0x47058c
mov eax, dword [ebx + 0x280]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0046ba50
mov eax, dword [ebx + 0x2cc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0046ba50
cmp byte [ebx + 0x158], 0
mov dword [esp + 4], esi
mov dword [esp], ebx
jne 0x4707f0
call fcn.0046b940
mov dword [ebx + 0x280], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0046b940
mov edi, dword [ebx + 0x280]
mov dword [ebx + 0x2b8], esi
lea edx, [edi + 0x20]
mov ecx, edx
and ecx, 0xf
mov dword [ebx + 0x2cc], eax
not ecx
add eax, 0x20
add ecx, edx
mov edx, eax
and edx, 0xf
not edx
add edx, eax
mov dword [ebx + 0x128], ecx
mov dword [ebx + 0x124], edx
jmp 0x47060d
and ch, 0xfd
mov dword [ebx + 0x80], ecx
jmp 0x470560
cmp edx, 7
mov eax, 8
cmovle edx, eax
cmp word [ebx + 0x154], 0
lea eax, [edx + edx]
cmovne edx, eax
jmp 0x4706b0
call fcn.0046b980
mov dword [ebx + 0x280], eax
jmp 0x470779
cmp word [ebx + 0x154], 1
sbb edx, edx
and edx, 0xfffffff8
add edx, 0x20
jmp 0x4706b0
cmp al, 6
mov edx, 0x40
mov eax, 0x30
cmovne edx, eax
jmp 0x4705b8
cmp word [ebx + 0x154], 0
je 0x4706b0
lea edi, [edx*4]
mov edx, 0x55555556
mov eax, edi
imul edx
sar edi, 0x1f
sub edx, edi
jmp 0x4706b0
mov eax, dword [ebx + 0xa0]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00459ae0
mov dword [esp + 4], str.Row_has_too_many_bytes_to_allocate_in_memory
mov dword [esp], ebx
call fcn.00459ae0
nop
nop
nop
nop
nop
nop
push esi
push ebx
sub esp, 0x14
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x28]
test ebx, ebx
je 0x4708b4
mov eax, dword [ebx + 0x64]
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, esi
jne 0x4708ba
add esp, 0x14
pop ebx
pop esi
ret
mov dword [esp + 4], str.Read_Error
mov dword [esp], ebx
call fcn.00459ae0
lea esi, [esi]