Function at 0x402900
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56be4e
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x5ca3a0]
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 dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor edi, edi
push 0xffffffffffffffff
mov esi, ecx
push edi
push esi
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x2a0], eax
mov dword [ebp - 0x2a8], esi
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], edi
mov word [ebp - 0x278], di
call fcn.00401d50
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x2a4]
push ecx
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x2a4], 0x3f
call fcn.004039c0
cmp eax, 0xffffffff
je 0x4029db
push eax
push edi
lea edx, [ebp - 0x2c4]
push edx
lea ecx, [ebp - 0x27c]
call fcn.00403760
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 1
call fcn.00401d50
mov ebx, 8
mov byte [ebp - 4], 0
cmp dword [ebp - 0x2ac], ebx
jb 0x4029e0
mov eax, dword [ebp - 0x2c0]
push eax
call fcn.0045d460
add esp, 4
jmp 0x4029e0
mov ebx, 8
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x2a4]
push ecx
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x2a4], 0x2f
call fcn.004039c0
cmp eax, 0xffffffff
je 0x402a52
mov ecx, dword [esi + 0x14]
add eax, 1
cmp eax, ecx
jae 0x402a52
push 0xffffffffffffffff
push eax
lea edx, [ebp - 0x2c4]
push edx
lea ecx, [ebp - 0x27c]
call fcn.00403760
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 2
call fcn.00401d50
mov byte [ebp - 4], 0
cmp dword [ebp - 0x2ac], ebx
jb 0x402a52
mov eax, dword [ebp - 0x2c0]
push eax
call fcn.0045d460
add esp, 4
cmp dword [ebp - 0x268], 4
jae 0x402a66
lea ecx, [ebp - 0x27c]
call fcn.00403690
or esi, 0xffffffff
cmp dword [ebp - 0x268], edi
mov dword [ebp - 0x2a4], esi
je 0x402be4
mov edx, dword [ebp - 0x2a0]
lea ecx, [ebp - 0x27c]
push ecx
add edx, 0x24
push edx
lea eax, [ebp - 0x298]
push eax
call fcn.00403df0
add esp, 0xc
push str..temp
push eax
lea ecx, [ebp - 0x260]
push ecx
mov byte [ebp - 4], 3
call fcn.00403ea0
add esp, 0xc
mov byte [ebp - 4], 5
cmp dword [ebp - 0x280], ebx
jb 0x402acf
mov edx, dword [ebp - 0x294]
push edx
call fcn.0045d460
add esp, 4
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], edi
mov word [ebp - 0x294], di
jae 0x402afa
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402b4c
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x402b1a
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x402b35
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402b4c
lea ecx, [ebp - 0x260]
call fcn.00403690
cmp dword [ebp - 0x24c], edi
je 0x402ba4
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x402b68
lea eax, [ebp - 0x25c]
push edi
push 0x80
push 1
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x2a4], esi
je 0x402ba4
mov ecx, dword [ebp - 0x2a0]
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x260]
push eax
add ecx, 0x40
call fcn.00401d50
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], ebx
jb 0x402bbf
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.0045d460
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x248], 7
mov dword [ebp - 0x24c], edi
mov word [ebp - 0x25c], di
jne 0x402f21
mov ebx, 8
push 9
push str.Setup.exe
lea ecx, [ebp - 0x298]
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], edi
mov word [ebp - 0x294], di
call fcn.00401a70
mov esi, dword [ebp - 0x2a0]
lea edx, [ebp - 0x298]
push edx
add esi, 0x24
lea eax, [ebp - 0x2c4]
push esi
push eax
mov byte [ebp - 4], 6
call fcn.00403df0
add esp, 0xc
push str..temp
push eax
lea ecx, [ebp - 0x244]
push ecx
mov byte [ebp - 4], 7
call fcn.00403ea0
add esp, 0xc
mov byte [ebp - 4], 9
cmp dword [ebp - 0x2ac], ebx
jb 0x402c65
mov edx, dword [ebp - 0x2c0]
push edx
call fcn.0045d460
add esp, 4
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x2ac], 7
mov dword [ebp - 0x2b0], edi
mov word [ebp - 0x2c0], di
jae 0x402c90
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402ce2
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
jae 0x402cb0
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
jae 0x402ccb
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402ce2
lea ecx, [ebp - 0x244]
call fcn.00403690
cmp dword [ebp - 0x230], edi
jne 0x402df7
push 0x20a
lea eax, [ebp - 0x226]
push edi
push eax
mov word [ebp - 0x228], di
call fcn.0047d440
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x402d15
mov esi, dword [esi + 4]
jmp 0x402d18
add esi, 4
lea ecx, [ebp - 0x228]
push ecx
push 1
push 0x5b7cc4
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, edi
jbe 0x402da6
lea eax, [ebp - 0x228]
mov word [ebp - 0x1e], di
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402d40
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x228]
push edx
lea ecx, [ebp - 0x244]
call fcn.00401a70
push 1
lea ebx, [ebp - 0x244]
call fcn.00403ab0
cmp eax, 0xffffffff
je 0x402da4
push eax
push 0
lea eax, [ebp - 0x2e0]
push eax
mov ecx, ebx
call fcn.00403760
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.00401d50
lea ecx, [ebp - 0x2e0]
mov byte [ebp - 4], 9
call fcn.00401650
xor edi, edi
cmp dword [ebp - 0x230], edi
jne 0x402dc5
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x298]
push ecx
lea ecx, [ebp - 0x244]
call fcn.00401d50
jmp 0x402dd7
push 0xa
push 0x5b7cd0
lea ecx, [ebp - 0x244]
call fcn.00403b50
mov eax, dword [ebp - 0x2a0]
cmp dword [eax + 0x54], edi
je 0x402df7
cmp dword [eax + 0x58], 8
jb 0x402ded
mov eax, dword [eax + 0x44]
jmp 0x402df0
add eax, 0x44
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x240]
mov esi, 8
cmp dword [ebp - 0x22c], esi
jae 0x402e10
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], esi
mov eax, dword [ebp - 0x240]
jae 0x402e2b
lea eax, [ebp - 0x240]
push edi
push 0x80
push 1
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [ebp - 0x2a0]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x2a4], esi
je 0x402e67
push 0xffffffffffffffff
push edi
lea edx, [ebp - 0x244]
push edx
lea ecx, [ebx + 0x40]
call fcn.00401d50
cmp dword [ebp - 0x22c], 8
jb 0x402e7f
mov eax, dword [ebp - 0x240]
push eax
call fcn.0045d460
add esp, 4
mov byte [ebp - 4], 0
cmp dword [ebp - 0x280], 8
mov dword [ebp - 0x22c], 7
mov dword [ebp - 0x230], edi
mov word [ebp - 0x240], di
jb 0x402eb2
mov ecx, dword [ebp - 0x294]
push ecx
call fcn.0045d460
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], edi
mov word [ebp - 0x294], di
jne 0x402f21
cmp dword [ebx], edi
je 0x402f00
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x2a8], esp
push 8
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], edi
push 0x5b7ce8
mov word [ecx + 4], di
call fcn.00401a70
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
cmp dword [ebp - 0x264], 8
jb 0x4030e1
mov ecx, dword [ebp - 0x278]
push ecx
call fcn.0045d460
add esp, 4
jmp 0x4030e1
mov ebx, dword [ebp - 0x2a0]
mov edx, dword [ebp - 0x2a8]
push esi
mov ecx, ebx
mov byte [ebp - 4], 0xb
call fcn.00403110
push esi
mov byte [ebp - 0x299], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x299], 0
mov dword [ebp - 0x2a4], 0xffffffff
jne 0x402f87
cmp dword [ebx + 0x58], 8
jb 0x402f73
mov eax, dword [ebx + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, 8
jmp 0x403084
lea eax, [ebx + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, 8
jmp 0x403084
mov eax, dword [ebx + 0x54]
add eax, 0xfffffffb
push eax
push edi
lea edx, [ebp - 0x2c4]
add ebx, 0x40
push edx
mov ecx, ebx
call fcn.00403760
mov esi, dword [ebp - 0x2a0]
push 0xffffffffffffffff
push edi
add esi, 8
push eax
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.00401d50
mov edi, 8
cmp dword [ebp - 0x2ac], edi
jb 0x402fd4
mov eax, dword [ebp - 0x2c0]
push eax
call fcn.0045d460
add esp, 4
cmp dword [esi + 0x18], edi
jb 0x402fde
mov ecx, dword [esi + 4]
jmp 0x402fe1
lea ecx, [esi + 4]
cmp dword [ebx + 0x18], edi
jb 0x402feb
mov eax, dword [ebx + 4]
jmp 0x402fee
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00481077
add esp, 8
test eax, eax
je 0x403084
cmp dword [esi + 0x18], edi
jb 0x40300a
mov eax, dword [esi + 4]
jmp 0x40300d
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esi + 0x18], edi
jb 0x40301e
mov ecx, dword [esi + 4]
jmp 0x403021
lea ecx, [esi + 4]
cmp dword [ebx + 0x18], edi
jb 0x40302b
mov eax, dword [ebx + 4]
jmp 0x40302e
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00481077
add esp, 8
cmp dword [esi + 0x18], edi
jb 0x403042
mov ecx, dword [esi + 4]
jmp 0x403045
lea ecx, [esi + 4]
cmp dword [ebx + 0x18], edi
jb 0x40304f
mov eax, dword [ebx + 4]
jmp 0x403052
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00481077
add esp, 8
test eax, eax
je 0x403084
cmp dword [esi + 0x18], edi
jb 0x40306a
mov esi, dword [esi + 4]
jmp 0x40306d
add esi, 4
cmp dword [ebx + 0x18], edi
jb 0x403077
mov ebx, dword [ebx + 4]
jmp 0x40307a
add ebx, 4
push 1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp dword [ebp - 0x264], edi
jb 0x40309b
mov ecx, dword [ebp - 0x278]
push ecx
call fcn.0045d460
add esp, 4
mov al, byte [ebp - 0x299]
jmp 0x4030e3
xor al, al
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.0047da50
mov esp, ebp
pop ebp
ret 4