Function at 0x406710
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x43bfa7
mov eax, dword fs:[0]
push eax
sub esp, 0xa30
mov eax, dword [0x44dc1c]
xor eax, esp
mov dword [esp + 0xa2c], eax
push esi
mov eax, dword [0x44dc1c]
xor eax, esp
push eax
lea eax, [esp + 0xa38]
mov dword fs:[0], eax
mov esi, ecx
push 0x4415b0
lea ecx, [esp + 0x14]
mov byte [esp + 0xe], 0
call fcn.004025b0
lea ecx, [esp + 0x14]
mov dword [esp + 0xa40], 0
call fcn.0041fae9
test esi, esi
mov byte [esp + 0xa40], 1
je 0x406a0e
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406786
sub eax, edx
sar eax, 1
je 0x406a0e
push 0x800
lea eax, [esp + 0x238]
push 0
push eax
call fcn.004260b0
push esi
push str._s.
lea ecx, [esp + 0x248]
push 0x400
push ecx
call fcn.0042482a
add esp, 0x1c
push 0
lea edx, [esp + 0x238]
push edx
lea ecx, [esp + 0x1c]
call fcn.0041fb77
test eax, eax
setne al
test al, al
je 0x4069cc
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esp + 0x14]
call fcn.0041f7fe
test eax, eax
lea ecx, [esp + 0x14]
setne byte [esp + 0xb]
call fcn.0041faac
test eax, eax
jne 0x40694a
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 0x38]
push 0x10
lea ecx, [esp + 0x18]
call edx
test eax, eax
je 0x40694a
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x18]
call fcn.0041fdd2
mov byte [esp + 0xa40], 2
mov eax, dword [eax]
push 0x3ff
push eax
push 0x400
push 0x457dd8
call fcn.0042400b
mov byte [esp + 0xa50], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406880
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x208
lea ecx, [esp + 0x30]
push 0
push ecx
call fcn.004260b0
mov eax, 0x457dd8
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4068a0
sub eax, edx
sar eax, 1
cmp word [eax*2 + 0x457dd6], 0x5c
jne 0x4068d9
mov eax, 0x457dd8
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4068c2
sub eax, edx
sar eax, 1
mov word [eax*2 + 0x457dd6], cx
push str.common.zip
push 0x457dd8
lea edx, [esp + 0x34]
push str._s_s
push edx
call fcn.00424794
add esp, 0x10
lea eax, [esp + 0x2c]
push eax
call esi
test eax, eax
jne 0x406957
push 0x208
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.004260b0
push str.common
push 0x457dd8
lea edx, [esp + 0x40]
push str._s_s
push edx
call fcn.00424794
add esp, 0x1c
lea eax, [esp + 0x2c]
push eax
call esi
test eax, eax
jne 0x40696f
push 0x800
push eax
push 0x457dd8
call fcn.004260b0
add esp, 0xc
cmp byte [esp + 0xb], 0
jne 0x4067f0
jmp 0x4069cc
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.0041fe63
mov byte [esp + 0xa40], 3
jmp 0x406985
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.0041fe63
mov byte [esp + 0xa40], 4
mov eax, dword [eax]
push 0x3ff
push eax
push 0x400
push 0x458dd8
call fcn.0042400b
mov byte [esp + 0xa50], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
add esp, 0x10
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4069c7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xa], 1
lea ecx, [esp + 0x14]
mov byte [esp + 0xa40], 0
call fcn.0041fb0f
mov dword [esp + 0xa40], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a08
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [esp + 0xa]
jmp 0x406a4c
lea ecx, [esp + 0x14]
mov byte [esp + 0xa40], 0
call fcn.0041fb0f
mov dword [esp + 0xa40], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a4a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0xa38]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0xa2c]
xor ecx, esp
call fcn.0042397a
add esp, 0xa3c
ret