Function at 0x474160
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x2c
push ebx
push ebp
movzx ebp, dx
mov ebx, ecx
push esi
push edi
mov dword [esp + 0x1c], ebx
mov esi, dword [ebp*4 + 0x550bc0]
mov dword [esp + 0x28], ebp
test esi, esi
je 0x474222
movzx ebp, word [esi + 0xd8]
mov eax, 0x10
cmp ebp, eax
cmova ebp, eax
add esi, 0xdc
mov eax, 0x80
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], esi
cmp dx, ax
jbe 0x47422c
xor eax, eax
cmp ax, bp
jae 0x4741dd
add esi, 0x28
movzx edi, bp
nop dword [eax]
mov eax, dword [esi]
test eax, eax
jle 0x4741d2
push 1
push eax
push ebx
call fcn.0048a035
add esp, 0xc
add esi, 0xd8
sub edi, 1
jne 0x4741c0
mov eax, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x550bc0]
movzx eax, word [eax + 0xd8]
cmp ax, 0x10
jle 0x474222
movsx edi, ax
xor esi, esi
sub edi, 0x10
test edi, edi
jle 0x474222
xor eax, eax
mov eax, dword [eax*4 + 0x53db40]
test eax, eax
je 0x47421a
push 1
push eax
push ebx
call fcn.0048a035
add esp, 0xc
inc esi
movzx eax, si
cmp eax, edi
jl 0x474203
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x14], ecx
cmp ax, bp
jae 0x4741dd
nop dword [eax]
mov edi, dword [esi + 0x28]
test edi, edi
jg 0x474265
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov byte [esi + 0x25], 0
jmp 0x47433b
mov al, byte [esi + 0x25]
mov ecx, edi
mov dl, al
mov byte [esp + 0x13], al
shr dl, 4
and dl, 1
mov byte [esp + 0x24], dl
je 0x474287
sar dword [esi + 0x2c], 1
sar ecx, 1
sar dword [esi + 0x30], 1
mov dword [esi + 0x28], ecx
cmp ecx, 0x3fffffff
jle 0x47429b
mov dword [esi + 0x28], 0x3fffffff
mov ecx, 0x3fffffff
test dl, dl
lea eax, [ecx + ecx]
cmove eax, ecx
add eax, 0x1f
push eax
call fcn.004896c5
mov ecx, eax
add esp, 4
mov dword [esi + 0x20], ecx
test ecx, ecx
jne 0x4742bc
xor al, al
jmp 0x4742c1
mov al, 1
add ecx, 0xf
mov dword [esi + 0x1c], ecx
test al, al
je 0x4743cc
test byte [esp + 0x13], 0x40
push ebx
je 0x474364
push 0x10
lea eax, [esp + 0x34]
push 1
push eax
call fcn.0048a775
mov eax, dword [esi + 0x28]
add esp, 0x10
mov edi, dword [esi + 0x1c]
inc eax
cdq
xor bl, bl
sub eax, edx
mov ebp, eax
sar ebp, 1
test ebp, ebp
jle 0x47432f
mov esi, dword [esp + 0x1c]
push esi
call fcn.00490555
movzx ecx, al
lea edi, [edi + 2]
mov eax, ecx
add esp, 4
and eax, 0xf
shr ecx, 4
add bl, byte [esp + eax + 0x2c]
mov byte [edi - 2], bl
add bl, byte [esp + ecx + 0x2c]
mov byte [edi - 1], bl
sub ebp, 1
jne 0x474301
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov al, byte [esi + 0x25]
test al, 0x20
je 0x474347
and al, 0xdf
mov byte [esi + 0x25], al
inc ecx
add esi, 0xd8
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], esi
cmp cx, bp
jb 0x474240
jmp 0x4741dd
movzx ecx, byte [esi + 0x25]
mov ebp, dword [esi + 0x28]
shr ecx, 4
and ecx, 1
shl ebp, cl
push ebp
push 1
push dword [esi + 0x1c]
call fcn.0048a775
add esp, 0x10
cmp ebp, edi
jge 0x474393
push 1
sub edi, ebp
push edi
push ebx
call fcn.0048a035
add esp, 0xc
movzx eax, byte [esi + 0x25]
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x1c]
push eax
call fcn.00435270
add esp, 4
test byte [esp + 0x13], 0x20
je 0x474333
sar dword [esi + 0x28], 1
mov ecx, esi
push dword [esp + 0x24]
mov edx, dword [esi + 0x28]
sar dword [esi + 0x2c], 1
sar dword [esi + 0x30], 1
call fcn.00437150
add esp, 4
jmp 0x474333
push str.Not_enough_memory_
call dword [0x54e480]
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret