Function at 0x474580
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov esi, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
mov eax, dword [0x4c1074]
xor eax, esp
mov dword [esp + 0x50], eax
cmp byte [ecx], 0
je 0x4745a9
mov dword [esp + 0xc], 0
jmp 0x4745b8
push dword [ecx + 0x14]
call fcn.0046ddad
add esp, 4
mov dword [esp + 0xc], eax
push 0x4afe52
push esi
call fcn.00484002
add esp, 8
test eax, eax
je 0x474915
mov edi, eax
call fcn.0046ef08
mov dword [esp + 8], eax
xor eax, eax
xor ebp, ebp
inc ebp
mov esi, 0x8000c
push eax
push ebp
push esi
call fcn.004115d0
add esp, 0xc
mov ebx, eax
mov dword [esp + 0x1c], edi
push edi
push esi
push ebp
push eax
call fcn.00484182
add esp, 0x10
lea ecx, [esp + 0x3c]
mov dword [esp + 0x18], ebx
mov dword [ecx], ebx
mov dword [esp + 0x24], eax
mov dword [ecx + 8], eax
xor eax, eax
mov dword [ecx + 4], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], ecx
mov eax, dword [esp + 0xc]
xor al, 1
mov byte [esp + 3], al
xor eax, eax
mov dword [esp + 0x20], 0
cmp eax, 0x40005
jbe 0x47468a
mov edi, dword [esp + 0x24]
sub edi, eax
mov esi, dword [esp + 0x18]
add eax, esi
push edi
push eax
push esi
call fcn.00478020
add esp, 0xc
mov eax, 0x8000c
sub eax, edi
lea ecx, [esi + edi]
push dword [esp + 0x1c]
push eax
push 1
push ecx
call fcn.00484182
add esp, 0x10
add edi, eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x44], edi
xor eax, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x4c], eax
jmp 0x47468e
mov eax, dword [esp + 0x4c]
push eax
call fcn.0041132d
add esp, 4
mov dword [esp + 4], eax
mov esi, dword [esp + 0x4c]
push dword [esi + 0x10]
call fcn.0041132d
add esp, 4
push eax
push dword [esi + 0x10]
call fcn.00411296
add esp, 8
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov esi, dword [esp + 0x4c]
push dword [esi + 0x10]
call fcn.0041132d
add esp, 4
push eax
push dword [esi + 0x10]
call fcn.00411296
add esp, 8
push edx
push eax
call fcn.0045b573
add esp, 8
mov esi, eax
cmp byte [eax], 0
mov ebx, 0xffffffff
je 0x4746fa
push esi
call fcn.00482f24
add esp, 4
mov ebx, eax
push esi
call fcn.00411645
add esp, 4
mov esi, dword [esp + 0x4c]
push dword [esi + 0x10]
call fcn.0041132d
add esp, 4
push eax
push dword [esi + 0x10]
call fcn.00411296
add esp, 8
mov ebp, eax
mov esi, edx
mov edi, dword [esp + 0x4c]
push dword [edi + 0x10]
call fcn.0041132d
add esp, 4
push eax
push dword [edi + 0x10]
call fcn.00411296
add esp, 8
mov edi, eax
mov eax, dword [esp + 0x4c]
cmp dword [eax + 0xc], 0
jne 0x4748e2
mov eax, dword [esp + 0x68]
mov eax, dword [eax + 8]
test eax, eax
js 0x4748d2
test ebx, ebx
js 0x474768
cmp eax, ebx
jne 0x4748d2
mov dword [esp + 0x28], edx
xor ebx, ebx
inc ebx
push dword [ebx*4 + 0x4a38b4]
push esi
push ebp
call fcn.0045b4e1
add esp, 0xc
test al, al
jne 0x47478f
inc ebx
cmp ebx, 3
jne 0x47476f
jmp 0x4748d2
mov eax, dword [esp + 4]
cmp eax, 0x100
je 0x4747fc
cmp eax, 6
je 0x47483d
test eax, eax
jne 0x4748d2
mov esi, dword [esp + 0x68]
cmp byte [esi], 0
jne 0x4748d2
push dword [esi + 0x14]
call fcn.0046df99
add esp, 4
cmp eax, 1
jne 0x4748d2
lea eax, [esp + 0x2c]
push eax
push dword [esi + 0x14]
call fcn.0046dfcf
add esp, 8
cmp dword [esp + 0x14], 4
jne 0x4748d2
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
cmp eax, dword [esp + 0x2c]
jne 0x4748d2
jmp 0x47488e
mov eax, dword [esp + 0x68]
cmp byte [eax], 0
setne al
cmp dword [esp + 8], 0
je 0x4748d2
or al, byte [esp + 0xc]
je 0x4748d2
mov byte [esp + 4], 1
push dword [esp + 8]
push dword [esp + 0x18]
push dword [esp + 0x18]
call fcn.0045b4e1
add esp, 0xc
test al, al
jne 0x474896
jmp 0x4748d2
mov esi, dword [esp + 0x68]
cmp byte [esi], 0
jne 0x4748d2
push dword [esi + 0x14]
call fcn.0046df99
add esp, 4
cmp eax, 2
jne 0x4748d2
lea eax, [esp + 0x2c]
push eax
push dword [esi + 0x14]
call fcn.0046dfcf
add esp, 8
cmp dword [esp + 0x14], 0x10
jne 0x4748d2
mov eax, dword [esp + 0x10]
movdqu xmm0, xmmword [eax]
movdqu xmm1, xmmword [esp + 0x2c]
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
cmp eax, 0xffff
jne 0x4748d2
mov al, byte [esp + 3]
mov byte [esp + 4], al
mov esi, dword [esp + 0x68]
mov dword [esi + 0x20], ebx
push dword [esi + 0x24]
call fcn.00411645
add esp, 4
push 0
push 1
mov ebx, dword [esp + 0x30]
push ebx
call fcn.004115d0
add esp, 0xc
mov dword [esi + 0x24], eax
push ebx
push edi
push eax
call fcn.00478020
add esp, 0xc
mov dword [esi + 0x28], ebx
mov al, byte [esp + 4]
mov dword [esp + 0x20], eax
test byte [esp + 0x20], 1
jne 0x4748e2
mov eax, dword [esp + 0x40]
jmp 0x474630
push dword [esp + 0x1c]
call fcn.00483a8b
add esp, 4
push 0x8000c
mov esi, dword [esp + 0x1c]
push esi
call fcn.0046d0f4
add esp, 8
push esi
call fcn.00411645
add esp, 4
push dword [esp + 8]
call fcn.00411645
add esp, 4
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00475526
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret