Function at 0x470020
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
movzx edi, word [eax + 0x1ac]
xor esi, esi
push 1
push edi
call fcn.00592c0b
mov ebx, eax
add esp, 8
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x470053
pop edi
lea eax, [esi + 1]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
push dword [eax]
push 1
push edi
push ebx
call fcn.00595b79
add esp, 0x10
cmp eax, 1
je 0x47007e
push ebx
call fcn.00592c4b
add esp, 4
mov eax, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [ebp - 0x18], esi
cmp dword [ebp + 0x14], esi
jle 0x4701ef
lea esp, [esp]
mov esi, dword [ebp + 0x1c]
xor edx, edx
mov dword [ebp - 8], edx
cmp dword [ebp + 0x10], edx
jle 0x4701c6
movzx eax, word [ebx + edi*2]
inc edi
mov ecx, eax
shr ax, 0xc
movzx eax, al
and ecx, 0xfff
cmp eax, 4
ja case.default.0x4700be
jmp dword [eax*4 + 0x4702e8]
inc edx
add edx, ecx
inc ecx
imul ecx, dword [ebp + 0x18]
mov dword [ebp - 8], edx
test ecx, ecx
jle case.default.0x4700be
jmp 0x4700e0
mov ax, word [ebx + edi*2]
inc edi
shr ax, 4
mov byte [esi], al
inc esi
dec ecx
jne 0x4700e0
jmp case.default.0x4700be
test ecx, ecx
js case.default.0x4700be
mov eax, dword [ebp + 0x18]
lea edx, [edi + 3]
add eax, eax
lea edx, [ebx + edx*2]
mov dword [ebp - 0x1c], eax
lea eax, [edi + 2]
lea eax, [ebx + eax*2]
dec ecx
add eax, 2
mov dword [ebp - 0xc], ecx
add edx, 2
movzx ecx, word [ebx + edi*2]
inc edi
mov ebx, dword [ebp - 8]
inc ebx
mov dword [ebp - 0x10], eax
add ebx, ecx
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 0x14]
test ecx, ecx
js 0x470176
mov ax, word [ebx + edi*2]
dec ecx
shr ax, 4
mov byte [esi], al
inc esi
cmp dword [ebp + 0x18], 2
jl 0x47016f
movzx eax, word [ebx + edi*2 + 2]
shr ax, 4
mov byte [esi], al
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
shr ax, 4
mov byte [esi + 1], al
add esi, 2
cmp dword [ebp + 0x18], 4
jl 0x47016f
mov ax, word [edx]
shr ax, 4
mov byte [esi], al
inc esi
test ecx, ecx
jns 0x470132
mov eax, dword [ebp - 0x10]
add edi, dword [ebp + 0x18]
add eax, dword [ebp - 0x1c]
add edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jns 0x470110
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + 0x1ac]
mov eax, ecx
shr eax, 1
sub eax, 2
cmp edi, eax
jl 0x4701bd
mov eax, dword [ebp + 8]
push dword [eax]
push 1
push ecx
push ebx
call fcn.00595b79
add esp, 0x10
cmp eax, 1
jne 0x470069
mov edx, dword [ebp - 8]
xor edi, edi
cmp edx, dword [ebp + 0x10]
jl 0x4700a1
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x20]
call fcn.004585b0
movzx esi, ax
add esp, 0x10
test si, si
jne 0x4701ef
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp + 0x14]
jl 0x470090
push ebx
call fcn.00592c4b
add esp, 4
mov ax, si
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
mov dx, word [ebx + edi*2]
inc eax
add eax, ecx
shr dx, 4
inc edi
mov dword [ebp - 8], eax
test ecx, ecx
js 0x470186
lea esp, [esp]
movzx eax, word [ebx + edi*2]
shr ax, 4
mov byte [esi], al
movzx eax, word [ebx + edi*2 + 2]
shr ax, 4
mov byte [esi + 1], al
movzx eax, word [ebx + edi*2 + 4]
add edi, 3
shr ax, 4
mov byte [esi + 2], al
mov byte [esi + 3], dl
add esi, 4
dec ecx
jns 0x470220
jmp 0x470186
mov al, byte [ebx + edi*2]
inc edi
mov byte [ebp - 1], al
test ecx, ecx
js case.default.0x4700be
lea edx, [edi + 2]
lea eax, [edi + 1]
lea edx, [ebx + edx*2]
lea eax, [ebx + eax*2]
mov edi, edi
dec ecx
add eax, 2
mov dword [ebp - 0xc], ecx
movzx ecx, word [ebx + edi*2]
mov ebx, dword [ebp - 8]
inc ebx
mov dword [ebp - 0x10], eax
add ebx, ecx
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 0x14]
test ecx, ecx
js 0x4702c2
mov edi, edi
movzx eax, word [ebx + edi*2 + 2]
shr ax, 4
mov byte [esi], al
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
shr ax, 4
mov byte [esi + 1], al
movzx eax, word [edx + 2]
shr ax, 4
mov byte [esi + 2], al
mov al, byte [ebp - 1]
mov byte [esi + 3], al
add esi, 4
dec ecx
jns 0x470290
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add edi, 4
add eax, 6
add edx, 8
test ecx, ecx
jns 0x470270
jmp 0x470186
mov edi, dword [ebp + 0xc]
movzx edi, word [edi + 0x1ac]
jmp case.default.0x4700be