Function at 0x4802a0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x50dc6c
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x5405a0]
xor eax, esp
mov dword [esp + 0x378], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5405a0]
xor eax, esp
push eax
lea eax, [esp + 0x390]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x3a0]
mov esi, dword [esp + 0x3a4]
mov ebp, dword [esp + 0x3a8]
lea ecx, [esp + 0x144]
call fcn.0043a090
mov eax, esi
lea edx, [esp + 0x144]
mov dword [esp + 0x398], 0
call fcn.0043a2e0
push 0
push 0
push 0
push 0
push 0
push str.sgim_picidx.v2.bin
lea ecx, [esp + 0x38]
call fcn.00436ef0
cmp byte [esp + 0x13c], 0
lea eax, [esp + 0x2c]
jne 0x48033f
mov eax, dword [esp + 0x28]
cmp word [eax + 4], 0x2e
jne 0x480358
lea ecx, [esp + 0x20]
lea esi, [esp + 0x144]
call fcn.00438040
jmp 0x480369
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x148]
call fcn.004374e0
cmp byte [esp + 0x13c], 0
mov esi, vtable.t_str.0
mov dword [esp + 0x20], esi
jne 0x480391
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
cmp eax, ecx
je 0x480391
push eax
call fcn.004ccef0
add esp, 4
mov edi, 1
lea ecx, [esp + 0x268]
mov dword [esp + 0x398], edi
call fcn.0043a090
mov eax, ebp
lea edx, [esp + 0x268]
mov byte [esp + 0x398], 2
call fcn.0043a2e0
push 0
push 0
push 0
push 0
push 0
push str.sgim_picidx.v2.bin
lea ecx, [esp + 0x38]
call fcn.00436ef0
cmp byte [esp + 0x13c], 0
lea eax, [esp + 0x2c]
jne 0x4803e9
mov eax, dword [esp + 0x28]
cmp word [eax + 4], 0x2e
jne 0x480407
lea ecx, [esp + 0x20]
lea esi, [esp + 0x268]
call fcn.00438040
mov esi, vtable.t_str.0
jmp 0x480418
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x26c]
call fcn.004374e0
cmp byte [esp + 0x13c], 0
mov dword [esp + 0x20], esi
jne 0x48043b
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
cmp eax, ecx
je 0x48043b
push eax
call fcn.004ccef0
add esp, 4
mov byte [esp + 0x398], 3
cmp byte [esp + 0x260], 0
lea eax, [esp + 0x150]
jne 0x48045b
mov eax, dword [esp + 0x14c]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4805ac
shr eax, 4
not al
and al, 1
je 0x4805ac
lea edx, [esp + 0x1c]
mov dword [esp + 0x18], edi
push edx
lea ecx, [esp + 0x148]
mov edi, ebx
mov dword [esp + 0x20], 0
call fcn.00483be0
add esp, 4
test al, al
jne 0x480504
mov esi, vtable.t_str.0
mov dword [esp + 0x268], esi
cmp byte [esp + 0x384], al
jne 0x4804d1
mov eax, dword [esp + 0x270]
lea ecx, [esp + 0x274]
cmp eax, ecx
je 0x4804d1
push eax
call fcn.004ccef0
add esp, 4
cmp byte [esp + 0x260], 0
mov dword [esp + 0x144], esi
jne 0x4804fd
mov eax, dword [esp + 0x14c]
lea edx, [esp + 0x150]
cmp eax, edx
je 0x4804fd
push eax
call fcn.004ccef0
add esp, 4
xor al, al
jmp 0x48061f
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x26c]
mov edi, ebx
call fcn.00483be0
add esp, 4
test al, al
jne 0x480581
mov esi, vtable.t_str.0
mov dword [esp + 0x268], esi
cmp byte [esp + 0x384], al
jne 0x48054e
mov eax, dword [esp + 0x270]
lea ecx, [esp + 0x274]
cmp eax, ecx
je 0x48054e
push eax
call fcn.004ccef0
add esp, 4
cmp byte [esp + 0x260], 0
mov dword [esp + 0x144], esi
jne 0x4804fd
mov eax, dword [esp + 0x14c]
lea edx, [esp + 0x150]
cmp eax, edx
je 0x4804fd
push eax
call fcn.004ccef0
add esp, 4
xor al, al
jmp 0x48061f
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x18]
jne 0x4805a7
lea ecx, [esp + 0x268]
call fcn.0043a230
lea ecx, [esp + 0x144]
call fcn.0043a230
mov al, 1
jmp 0x48061f
mov esi, vtable.t_str.0
push 0
lea ecx, [esp + 0x148]
push ecx
push ebx
lea ecx, [esp + 0x274]
call fcn.00438310
cmp byte [esp + 0x384], 0
mov bl, al
mov dword [esp + 0x268], esi
jne 0x4805f1
mov eax, dword [esp + 0x270]
lea edx, [esp + 0x274]
cmp eax, edx
je 0x4805f1
push eax
call fcn.004ccef0
add esp, 4
cmp byte [esp + 0x260], 0
mov dword [esp + 0x144], esi
jne 0x48061d
mov eax, dword [esp + 0x14c]
lea ecx, [esp + 0x150]
cmp eax, ecx
je 0x48061d
push eax
call fcn.004ccef0
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x390]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x378]
xor ecx, esp
call fcn.004ccee1
add esp, 0x388
ret 0xc