Function at 0x505640
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x57745d
mov eax, dword fs:[0]
push eax
sub esp, 0x2b8
mov eax, dword [0x5c5678]
xor eax, esp
mov dword [esp + 0x2b0], eax
push ebx
push esi
push edi
mov eax, dword [0x5c5678]
xor eax, esp
push eax
lea eax, [esp + 0x2c8]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x20], edi
mov eax, dword [esi]
mov ebx, ecx
cmp dword [eax - 0xc], edi
je 0x5058d0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x5058d0
lea eax, [esp + 0x84]
push eax
mov byte [esp + 0x1b], 0
call int.004255e0
mov dword [esp + 0x2d0], edi
call fcn.00425b30
push 0x40
lea ecx, [esp + 0x88]
push ecx
call fcn.004258f0
push esi
lea edx, [esp + 0x1c]
push edx
lea ecx, [ebx - 0x1f0]
lea edx, [esp + 0xb4]
call fcn.00430220
mov eax, dword [eax]
cmp eax, 1
jne 0x5058be
mov byte [esp + 0x17], al
push edi
lea eax, [ebx - 0x338]
mov ecx, str.IDS_UPLOADING
lea esi, [esp + 0x6c]
call fcn.004adac0
mov byte [esp + 0x2d0], 1
cmp dword [eax + 0x18], 8
jb 0x505725
mov edi, dword [eax + 4]
mov dword [esp + 0x18], edi
jmp 0x50572e
add eax, 4
mov dword [esp + 0x18], eax
mov edi, eax
cmp dword [ebx + 0xc8], 0
jne 0x505772
push 0x5cea3e
push 0x1e8
call fcn.0053f363
add esp, 8
mov dword [esp + 0x1c], eax
mov byte [esp + 0x2d0], 2
test eax, eax
je 0x505762
mov esi, eax
call fcn.004fa660
jmp 0x505764
xor eax, eax
mov byte [esp + 0x2d0], 1
mov dword [ebx + 0xc8], eax
mov eax, dword [ebx + 0xc8]
test eax, eax
je 0x5058b5
mov eax, dword [eax + 0x30]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x5058a3
mov ecx, dword [ebx - 0x35c]
push 2
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [ebx + 0xc8]
push 0x82
mov dword [ebx + 0x158], eax
call fcn.00477b20
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x5057f6
push str.IDS_LOADING
xor al, al
or ecx, 0xffffffff
lea esi, [esp + 0x48]
call fcn.004adb10
mov byte [esp + 0x2d0], 3
cmp dword [eax + 0x18], 8
mov dword [esp + 0x20], 1
jb 0x5057f3
mov eax, dword [eax + 4]
jmp 0x5057f6
add eax, 4
mov edx, dword [ebx + 0xc8]
push edx
mov edx, eax
call fcn.004e6dc0
mov dword [esp + 0x2d0], 1
test byte [esp + 0x20], 1
je 0x50581f
lea ecx, [esp + 0x44]
call fcn.0040f400
mov eax, dword [ebx + 0xc8]
push ecx
mov byte [eax + 0x1dc], 1
lea eax, [ebx + 0x10]
mov ecx, esp
mov dword [esp + 0x20], esp
call fcn.00473d80
lea esi, [esp + 0x48]
call fcn.00493db0
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x2c], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x30], ecx
mov edx, dword [eax + 0xc]
add esp, 4
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x38], edx
call dword [sym.imp.USER32.dll_CopyRect]
push ecx
mov eax, esp
mov dword [esp + 0x20], esp
mov dword [eax], 0
push ecx
mov eax, esp
lea edx, [esp + 0x3c]
mov dword [eax], edx
mov eax, dword [ebx - 0x35c]
mov esi, dword [ebx + 0xc8]
mov dword [esp + 0x24], esp
push eax
add esi, 0x2c
call fcn.00506940
jmp 0x5058b5
test edi, edi
je 0x5058b5
mov ecx, dword [ebx + 0xc8]
push ecx
mov edx, edi
call fcn.004e6dc0
lea ecx, [esp + 0x68]
call fcn.0040f400
lea edi, [esp + 0x84]
call fcn.00425ba0
mov al, byte [esp + 0x17]
jmp 0x5058d2
xor al, al
mov ecx, dword [esp + 0x2c8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2b0]
xor ecx, esp
call fcn.0053d78d
mov esp, ebp
pop ebp
ret 4