Function at 0x405b10
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454ea6
mov eax, dword fs:[0]
push eax
sub esp, 0xe60
mov eax, dword [0x468060]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0x10
mov ebx, 1
mov dword [ebp - 0xe68], ebx
jb 0x405b57
mov eax, dword [eax + 4]
jmp 0x405b5a
add eax, 4
mov edi, eax
call fcn.00401930
mov edi, eax
test edi, edi
jne 0x405b6e
xor eax, eax
jmp 0x405dae
mov esi, dword [edi + 8]
test esi, esi
je 0x405ba7
jmp 0x405b80
mov ecx, dword [esi + 0x20]
mov eax, str.code
call fcn.00401620
test eax, eax
je 0x405b99
mov esi, dword [esi]
test esi, esi
jne 0x405b80
jmp 0x405ba7
test esi, esi
je 0x405ba7
cmp dword [esi + 0x14], 0
jne 0x405dac
mov esi, dword [edi + 8]
test esi, esi
je 0x405dac
mov ecx, dword [esi + 0x20]
mov eax, str.data
call fcn.00401620
test eax, eax
je 0x405bce
mov esi, dword [esi]
test esi, esi
jne 0x405bb2
jmp 0x405dac
test esi, esi
je 0x405dac
push 0x400
lea eax, [ebp - 0x65c]
push 0
push eax
call fcn.0040c3b0
add esp, 0xc
mov edi, str.check
mov eax, esi
call fcn.00401d50
test eax, eax
je 0x405c10
mov eax, dword [eax + 0x10]
test eax, eax
je 0x405c10
mov edx, 0x40
lea ecx, [ebp - 0x54]
call fcn.00405fb0
mov edi, 0x45ff04
mov eax, esi
call fcn.00401d50
test eax, eax
je 0x405c42
mov esi, dword [eax + 0x10]
test esi, esi
je 0x405c42
mov eax, esi
mov edx, 0x400
lea ecx, [ebp - 0x65c]
call fcn.00405fb0
push esi
call fcn.0040b3fe
add esp, 4
lea ecx, [ebp - 0x65c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jg 0x405b67
lea eax, [edi + edi]
call fcn.004154f0
mov esi, esp
push 3
mov edx, edi
lea eax, [ebp - 0x65c]
call fcn.00403a10
mov esi, eax
test esi, esi
je 0x405b67
push 0x800
lea edx, [ebp - 0xe5c]
push 0
push edx
call fcn.0040c3b0
add esp, 0xc
push 0x45ff08
push esi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov edx, 0x800
lea ecx, [ebp - 0xe5c]
test eax, eax
jne 0x405cd0
push str.http:__
call fcn.00403b50
push esi
lea eax, [ebp - 0xe5c]
push eax
mov eax, 0x800
call fcn.00403a70
jmp 0x405cd6
push esi
call fcn.00403b50
lea edi, [ebp - 0xe5c]
lea ecx, [ebp - 0xe60]
call fcn.004058b0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xe60]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405d83
push 0x208
lea edx, [ebp - 0x25c]
push 0
push edx
call fcn.0040c3b0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x25c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str...down
lea ecx, [ebp - 0x25c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [ebp - 0xe60]
lea edx, [ebp - 0x25c]
push edx
push eax
call fcn.00405670
add esp, 8
lea ecx, [ebp - 0xe64]
push ecx
lea ecx, [ebp - 0x25c]
call fcn.00402540
lea ebx, [ebp - 0xe64]
mov byte [ebp - 4], 1
call fcn.00405a60
mov eax, ebx
call fcn.004025f0
mov ebx, dword [ebp - 0xe68]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xe60]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405dac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
lea esp, [ebp - 0xe7c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040b009
mov esp, ebp
pop ebp
ret