Function at 0x4779a0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x20
mov eax, dword [0x517ff0]
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
push edi
xor esi, esi
push eax
push ebx
mov dword [esp + 0x24], 0x4a2d44
mov dword [esp + 0x28], 0x4a2d48
mov dword [esp + 0x2c], 0x4a2d40
mov dword [esp + 0x30], 0x4a2d2c
mov dword [esp + 0x34], esi
mov dword [esp + 0x18], esi
call fcn.0045d6a0
mov ebp, eax
add esp, 8
cmp ebp, 0xffffffff
jne 0x4779f5
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
mov edi, eax
cmp edi, esi
jne 0x477a0c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
inc edi
mov eax, 0x4a2d44
push eax
push edi
call fcn.0045c4a0
add esp, 8
test eax, eax
jne 0x477a29
mov eax, dword [esp + esi*4 + 0x20]
inc esi
test eax, eax
jne 0x477a12
mov eax, dword [esp + esi*4 + 0x1c]
test eax, eax
jne 0x477b3f
push 0
push 0x80
push 3
push 0
push 0
push bind
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x477a5f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [esp + 0x38], eax
call fcn.0048ac32
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x477a8e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x18]
push 0
push ecx
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
test ebp, ebp
mov eax, dword [ecx]
jne 0x477bf6
cmp eax, 0x1a53454e
jne 0x477b97
xor eax, eax
xor edx, edx
mov al, byte [ecx + 4]
mov dl, byte [ecx + 5]
mov bl, 4
lea eax, [edx + eax*2]
mov dl, byte [ecx + 6]
shl eax, 0xd
test bl, dl
je 0x477ae0
add eax, 0x200
mov edx, dword [0x52445c]
test edx, edx
mov edx, dword [esp + 0x34]
jne 0x477af5
lea esi, [edx - 0x10]
cmp eax, esi
jbe 0x477af8
lea eax, [edx - 0x10]
add ecx, 0x10
push eax
push ecx
call fcn.0045d8d0
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
xor eax, eax
add esp, 8
mov al, byte [ecx + 4]
mov dl, byte [ecx + 6]
shl eax, 0xe
test bl, dl
je 0x477b21
add eax, 0x200
mov edx, dword [esp + 0x34]
add edx, 0xfffffff0
cmp edx, eax
jb 0x477b6a
add ecx, 0x10
push eax
push ecx
call fcn.0045d8d0
mov ecx, dword [esp + 0x18]
add esp, 8
jmp 0x477b6c
mov edx, dword [0x517ff0]
lea eax, [esp + 0x34]
push ebp
lea ecx, [esp + 0x14]
push eax
push ecx
push edx
push ebx
call fcn.0045d850
add esp, 0x14
test eax, eax
jne 0x477aa9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
xor eax, eax
mov esi, dword [esp + 0x38]
mov edi, ecx
mov edx, esi
sub edi, esi
mov ebp, 0x10
mov bl, byte [edi + edx]
mov byte [edx], bl
inc edx
dec ebp
jne 0x477b7b
mov edx, dword [esp + 0x14]
mov dword [esi + 0x18], eax
mov dword [esi + 0x10], edx
mov edx, dword [esp + 0x34]
mov dword [esi + 0x14], edx
jmp 0x477c16
cmp eax, 0x1a534446
jne 0x477c16
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov esi, 0x4a
xor ebx, ebx
cmp eax, esi
jbe 0x477be6
cmp byte [esi + ecx], 3
jne 0x477be6
xor eax, eax
mov ah, byte [esi + ecx + 0xe]
mov al, byte [esi + ecx + 0xd]
lea ecx, [esi + ecx + 0x11]
mov edi, eax
push edi
push ecx
call fcn.0045d8d0
mov ecx, dword [esp + 0x18]
mov dword [ebp + ebx*4 + 0xc], eax
mov eax, dword [esp + 0x3c]
add esp, 8
lea esi, [esi + edi + 0x11]
inc ebx
cmp esi, eax
jb 0x477bb1
xor edx, edx
mov dword [ebp], eax
mov dl, byte [ecx + 4]
mov dword [ebp + 8], ebx
mov dword [ebp + 4], edx
jmp 0x477c16
cmp ebp, 2
jne 0x477c16
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
push eax
push ecx
mov dword [esi], eax
call fcn.0045d8d0
mov ecx, dword [esp + 0x18]
add esp, 8
mov dword [esi + 4], eax
test ecx, ecx
je 0x477c23
push ecx
call fcn.0048ace4
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret