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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41aae0
mov eax, dword fs:[0]
push eax
sub esp, 0xbe0
mov eax, dword [0x422060]
xor eax, esp
mov dword [esp + 0xbd8], eax
push ebx
push esi
push edi
mov eax, dword [0x422060]
xor eax, esp
push eax
lea eax, [esp + 0xbf0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ebx, [esp + 0x180]
mov dword [esp + 0x14], eax
call fcn.00404dd0
xor edi, edi
push 0x208
lea ecx, [esp + 0x1da]
push edi
mov dword [esp + 0xc00], edi
push ecx
mov word [esp + 0x1e0], di
call fcn.0040d560
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push str.starter_new__x_
push 0xffffffffffffffff
lea edx, [esp + 0x1e0]
push 0x104
push edx
call fcn.0040b958
add esp, 0x14
push 0xffffffffffffffff
mov esi, 7
push edi
mov eax, ebx
lea ecx, [esp + 0x60]
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], edi
mov word [esp + 0x64], di
call fcn.00401ba0
lea eax, [esp + 0x1d4]
mov byte [esp + 0xbf8], 1
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401110
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x1d8]
push eax
lea ecx, [esp + 0x60]
call fcn.00401c60
mov eax, dword [esp + 0x5c]
mov ebx, 8
cmp dword [esp + 0x70], ebx
jae 0x401144
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401154
test al, 0x10
jne 0x40116b
cmp dword [esp + 0x70], ebx
mov eax, dword [esp + 0x5c]
jae 0x401162
lea eax, [esp + 0x5c]
push eax
call fcn.00403df0
add esp, 4
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x60]
lea ecx, [esp + 0x7c]
mov dword [esp + 0x94], esi
mov dword [esp + 0x90], edi
mov word [esp + 0x80], di
call fcn.00401ba0
push 0xb
push str.starter.zip
lea ecx, [esp + 0x7c]
mov byte [esp + 0xc00], 2
call fcn.00401c60
cmp dword [esp + 0x70], ebx
mov eax, dword [esp + 0x5c]
jae 0x4011b7
lea eax, [esp + 0x5c]
push eax
push str.ReleasePacket_ResourceToFile_strPacketZip_s
push 0xd2
push str..StarterOnlineUp.cpp
call fcn.004035b0
mov esi, dword [esp + 0x88]
add esp, 0x10
cmp dword [esp + 0x8c], ebx
jae 0x4011e3
lea esi, [esp + 0x78]
mov ecx, dword [esp + 0x14]
push str.STARTER
push 0x81
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
jne 0x401215
push str.ResourceToFile_FindResource_hResInfo__NULL_Failed
push 0xc8
push str..Resourcecommon.cpp
call fcn.004035b0
add esp, 0xc
jmp 0x401222
mov ecx, dword [esp + 0x14]
call fcn.004055f0
cmp eax, edi
jne 0x4012a1
push str.ReleasePacket_ResourceToFile_Failed
push 0xd2
push str..StarterOnlineUp.cpp
call fcn.004035b0
add esp, 0xc
cmp dword [esp + 0x8c], ebx
jb 0x40124f
mov edx, dword [esp + 0x78]
push edx
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x70], ebx
mov esi, 7
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], edi
mov word [esp + 0x78], di
jb 0x40127a
mov eax, dword [esp + 0x5c]
push eax
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x198], ebx
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], edi
mov word [esp + 0x5c], di
jb 0x401adf
mov ecx, dword [esp + 0x184]
push ecx
jmp 0x401ad7
mov ebx, 7
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xa4], edi
mov word [esp + 0x94], di
mov dword [esp + 0xb0], edi
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb8], edi
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0xc00], 4
push ecx
lea ecx, [esp + 0x80]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
call fcn.004056e0
add esp, 0xc
cmp eax, edi
je 0x401395
push str.ReleasePacket_ZipCommon::UnzipFilesImpl_Failed
push 0xdc
push str..StarterOnlineUp.cpp
call fcn.004035b0
add esp, 0xc
lea esi, [esp + 0x90]
call fcn.00401b10
mov esi, 8
cmp dword [esp + 0x8c], esi
jb 0x401348
mov edx, dword [esp + 0x78]
push edx
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x70], esi
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x88], edi
mov word [esp + 0x78], di
jb 0x40136e
mov eax, dword [esp + 0x5c]
push eax
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x198], esi
mov dword [esp + 0x70], ebx
mov dword [esp + 0x6c], edi
mov word [esp + 0x5c], di
jb 0x401adf
mov ecx, dword [esp + 0x184]
push ecx
jmp 0x401ad7
lea esi, [esp + 0x164]
call fcn.00404d70
mov edx, esi
push edx
mov ebx, str.Starter.exe
lea esi, [esp + 0x114]
mov byte [esp + 0xbfc], 5
call fcn.004021c0
add esp, 4
mov byte [esp + 0xbf8], 6
push 0xffffffffffffffff
mov esi, 7
push edi
lea eax, [esp + 0x118]
lea ecx, [esp + 0xfc]
mov dword [esp + 0x114], esi
mov dword [esp + 0x110], edi
mov word [esp + 0x100], di
call fcn.00401ba0
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], edi
mov word [esp + 0xdc], di
mov byte [esp + 0xbf8], 8
mov ebx, dword [esp + 0xb0]
mov eax, dword [esp + 0xb4]
cmp ebx, eax
jbe 0x401435
call fcn.0040b939
mov eax, dword [esp + 0xb4]
cmp dword [esp + 0xb0], eax
mov esi, eax
jbe 0x40144c
call fcn.0040b939
mov eax, dword [esp + 0xb4]
cmp ebx, esi
je 0x401807
cmp ebx, eax
jb 0x40145d
call fcn.0040b939
lea eax, [esp + 0x90]
push ebx
push eax
lea edi, [esp + 0x150]
call fcn.00402270
add esp, 8
mov byte [esp + 0xbf8], 9
cmp ebx, dword [esp + 0xb4]
jb 0x40148b
call fcn.0040b939
mov eax, dword [ebx + 0x14]
push str.StarterHelper.exe
mov edi, 0x11
mov ecx, ebx
call fcn.00402320
test eax, eax
jne 0x4014b9
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x150]
lea ecx, [esp + 0xe0]
call fcn.00401ba0
cmp ebx, dword [esp + 0xb4]
jb 0x4014c7
call fcn.0040b939
lea ecx, [esp + 0x164]
push ebx
push ecx
lea edi, [esp + 0xc4]
call fcn.00402270
add esp, 8
mov byte [esp + 0xbf8], 0xa
mov eax, dword [esp + 0xc0]
mov esi, 8
cmp dword [esp + 0xd4], esi
jae 0x401503
lea eax, [esp + 0xc0]
mov edi, dword [esp + 0xd0]
push eax
mov eax, dword [esp + 0x128]
lea ecx, [esp + 0x114]
call fcn.00402320
test eax, eax
jne 0x40167a
cmp ebx, dword [esp + 0xb4]
jb 0x401534
call fcn.0040b939
push ebx
lea ecx, [esp + 0x1bc]
call fcn.00404b70
add esp, 4
push esi
push str._newtemp
lea ecx, [esp + 0x1c0]
mov byte [esp + 0xc00], 0xb
call fcn.00401c60
cmp ebx, dword [esp + 0xb4]
jb 0x40156c
call fcn.0040b939
mov eax, ebx
lea ecx, [esp + 0x19c]
call fcn.00404b10
lea edx, [esp + 0x1b8]
push edx
lea eax, [esp + 0x168]
push eax
lea edi, [esp + 0x44]
mov byte [esp + 0xc00], 0xc
call fcn.00402270
lea ecx, [esp + 0x1a4]
push ecx
push eax
lea edi, [esp + 0x30]
mov byte [esp + 0xc08], 0xd
call fcn.00402270
add esp, 0x10
push 0xffffffffffffffff
xor edi, edi
push edi
lea ecx, [esp + 0xc4]
mov byte [esp + 0xc00], 0xe
call fcn.00401ba0
cmp dword [esp + 0x38], esi
jb 0x4015e4
mov edx, dword [esp + 0x24]
push edx
call fcn.0040b5a3
add esp, 4
mov byte [esp + 0xbf8], 0xc
cmp dword [esp + 0x54], esi
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], edi
mov word [esp + 0x24], di
jb 0x401610
mov eax, dword [esp + 0x40]
push eax
call fcn.0040b5a3
add esp, 4
push 0xffffffffffffffff
push edi
lea eax, [esp + 0xc4]
lea ecx, [esp + 0xfc]
call fcn.00401ba0
cmp dword [esp + 0x1b4], esi
jb 0x40163f
mov ecx, dword [esp + 0x1a0]
push ecx
call fcn.0040b5a3
add esp, 4
mov byte [esp + 0xbf8], 0xa
cmp dword [esp + 0x1d0], esi
mov dword [esp + 0x1b4], 7
mov dword [esp + 0x1b0], edi
mov word [esp + 0x1a0], di
jb 0x40167a
mov edx, dword [esp + 0x1bc]
push edx
call fcn.0040b5a3
add esp, 4
lea ecx, [esp + 0xbc]
lea edi, [esp + 0x12c]
call fcn.00404a60
mov byte [esp + 0xbf8], 0xf
cmp dword [esp + 0x144], esi
mov eax, dword [esp + 0x130]
jae 0x4016ac
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4016bc
test al, 0x10
jne 0x4016dc
cmp dword [esp + 0x144], esi
mov eax, dword [esp + 0x130]
jae 0x4016d3
lea eax, [esp + 0x130]
push eax
call fcn.00403df0
add esp, 4
cmp dword [esp + 0xd4], esi
mov ecx, dword [esp + 0xc0]
jae 0x4016f3
lea ecx, [esp + 0xc0]
cmp dword [esp + 0x160], esi
mov eax, dword [esp + 0x14c]
jae 0x40170a
lea eax, [esp + 0x14c]
push ecx
push eax
push str.Copy_SrcFile_s_DestFile_s
push 0xd2
push str..StarterOnlineUp.cpp
call fcn.004035b0
mov eax, dword [esp + 0xd4]
add esp, 0x14
cmp dword [esp + 0xd4], esi
jae 0x40173a
lea eax, [esp + 0xc0]
cmp dword [esp + 0x160], esi
mov ecx, dword [esp + 0x14c]
jae 0x401751
lea ecx, [esp + 0x14c]
mov esi, eax
call fcn.00404620
mov edi, 8
cmp dword [esp + 0x144], edi
jb 0x401776
mov eax, dword [esp + 0x130]
push eax
call fcn.0040b5a3
add esp, 4
xor esi, esi
cmp dword [esp + 0xd4], edi
mov dword [esp + 0x144], 7
mov dword [esp + 0x140], esi
mov word [esp + 0x130], si
jb 0x4017ab
mov ecx, dword [esp + 0xc0]
push ecx
call fcn.0040b5a3
add esp, 4
mov byte [esp + 0xbf8], 8
cmp dword [esp + 0x160], edi
mov dword [esp + 0xd4], 7
mov dword [esp + 0xd0], esi
mov word [esp + 0xc0], si
jb 0x4017e6
mov edx, dword [esp + 0x14c]
push edx
call fcn.0040b5a3
add esp, 4
mov eax, dword [esp + 0xb4]
cmp ebx, eax
jb 0x4017fd
call fcn.0040b939
mov eax, dword [esp + 0xb4]
add ebx, 0x1c
xor edi, edi
jmp 0x401435
mov eax, dword [esp + 0xdc]
mov esi, 8
cmp dword [esp + 0xf0], esi
jae 0x401823
lea eax, [esp + 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40183a
test al, 0x10
jne 0x40183a
mov ebx, 1
jmp 0x40183c
xor ebx, ebx
lea eax, [esp + 0xf4]
push eax
mov ecx, eax
push ecx
call fcn.00406510
lea edx, [esp + 0x118]
push edx
mov eax, edx
push eax
call fcn.00406510
push 0x7fe
lea ecx, [esp + 0x3fa]
push edi
push ecx
mov word [esp + 0x400], di
call fcn.0040d560
add esp, 0x1c
cmp dword [esp + 0x10c], esi
jb 0x401890
mov edx, dword [esp + 0xf8]
mov dword [esp + 0x14], edx
jmp 0x40189b
lea eax, [esp + 0xf8]
mov dword [esp + 0x14], eax
cmp dword [esp + 0x128], esi
mov esi, dword [esp + 0x114]
jae 0x4018b2
lea esi, [esp + 0x114]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push esi
push str._opreplace__newfile_s__oldfile_s__processid_d
push 0xffffffffffffffff
lea edx, [esp + 0x3f8]
push 0x400
push edx
call fcn.0040b958
mov eax, dword [esp + 0xf8]
add esp, 0x1c
cmp dword [esp + 0xf0], 8
jae 0x4018f3
lea eax, [esp + 0xdc]
lea ecx, [esp + 0x3e4]
push ecx
push ebx
push eax
push str.ReleasePacket_strStarterHelper_File_s_bFileExist_d_szCmd_s
push 0xdc
push str..StarterOnlineUp.cpp
call fcn.004035b0
add esp, 0x18
cmp ebx, edi
je 0x401941
cmp dword [esp + 0xf0], 8
mov eax, dword [esp + 0xdc]
jae 0x401930
lea eax, [esp + 0xdc]
lea edx, [esp + 0x3e4]
push edx
push eax
call fcn.004067d0
add esp, 8
cmp dword [esp + 0xf0], 8
jb 0x40195b
mov eax, dword [esp + 0xdc]
push eax
call fcn.0040b5a3
add esp, 4
mov ebx, 8
cmp dword [esp + 0x10c], ebx
mov esi, 7
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], edi
mov word [esp + 0xdc], di
jb 0x401994
mov ecx, dword [esp + 0xf8]
push ecx
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x128], ebx
mov dword [esp + 0x10c], esi
mov dword [esp + 0x108], edi
mov word [esp + 0xf8], di
jb 0x4019c3
mov edx, dword [esp + 0x114]
push edx
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x17c], ebx
mov dword [esp + 0x128], esi
mov dword [esp + 0x124], edi
mov word [esp + 0x114], di
jb 0x4019f2
mov eax, dword [esp + 0x168]
push eax
call fcn.0040b5a3
add esp, 4
mov eax, dword [esp + 0xb0]
cmp eax, edi
mov dword [esp + 0x17c], esi
mov dword [esp + 0x178], edi
mov word [esp + 0x168], di
je 0x401a39
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0xb4]
push ecx
call fcn.00402390
mov edx, dword [esp + 0xb4]
add esp, 4
push edx
call fcn.0040b5a3
add esp, 4
xor edi, edi
cmp dword [esp + 0xa8], ebx
mov dword [esp + 0xb0], edi
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb8], edi
jb 0x401a67
mov eax, dword [esp + 0x94]
push eax
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x8c], ebx
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], edi
mov word [esp + 0x94], di
jb 0x401a93
mov ecx, dword [esp + 0x78]
push ecx
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x70], ebx
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], edi
mov word [esp + 0x78], di
jb 0x401ab9
mov edx, dword [esp + 0x5c]
push edx
call fcn.0040b5a3
add esp, 4
cmp dword [esp + 0x198], ebx
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], edi
mov word [esp + 0x5c], di
jb 0x401adf
mov eax, dword [esp + 0x184]
push eax
call fcn.0040b5a3
add esp, 4
mov ecx, dword [esp + 0xbf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xbd8]
xor ecx, esp
call fcn.0040b949
mov esp, ebp
pop ebp
ret