Function at 0x401f80
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x364
mov edx, dword [ebp + 0xc]
test edx, edx
mov eax, dword [0x40e060]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x368], eax
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0xc], edx
je 0x4023bf
test ebx, ebx
je 0x4023bf
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
push edx
push 1
stosb byte es:[edi], al
push 0x105
lea eax, [esp + 0x5c]
push eax
push ebx
mov ecx, esi
call fcn.00401e70
mov esi, eax
test esi, esi
jne 0x4023a8
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 0x120]
test eax, eax
je 0x4020c2
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x158]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x158]
test edx, edx
stosb byte es:[edi], al
je 0x402115
push 0x40c288
push ebx
call fcn.00405210
add esp, 8
test eax, eax
jne 0x40204c
lea edx, [esp + 0x158]
mov eax, ebx
sub edx, ebx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402040
jmp 0x4020c0
mov ecx, eax
sub ecx, ebx
test ecx, ecx
jle 0x402115
mov ecx, dword [esp + 0xc]
add ecx, 0x3ac
lea esi, [esp + 0x158]
sub esi, ecx
jmp 0x402070
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x402070
lea edi, [esp + 0x158]
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402082
mov dx, word [0x40c250]
inc eax
mov word [edi], dx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402097
lea edi, [esp + 0x158]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4020a8
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
mov edi, dword [esp + 0xc]
mov eax, dword [edi + 0x11c]
test eax, eax
je 0x402321
add edi, 0x2a8
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4020e0
sub eax, edx
inc eax
push eax
call fcn.004052d2
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
jne 0x40212f
mov eax, 0xe
mov ecx, dword [esp + 0x36c]
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, 2
mov ecx, dword [esp + 0x36c]
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, eax
mov ecx, edi
sub esi, edi
mov dl, byte [ecx]
mov byte [esi + ecx], dl
inc ecx
test dl, dl
jne 0x402135
mov ebx, dword [esp + 0x18]
mov edi, eax
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], ecx
push 0x18
mov dword [esp + 0x48], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x34], ecx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x54], eax
push 0x18
mov dword [esp + 0x40], ecx
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebx
mov dword [esp + 0x30], edi
call fcn.00401d30
mov esi, eax
cmp esi, 0xea
jne 0x402300
lea esp, [esp]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x50]
inc eax
push 0x2e
push edx
mov dword [esp + 0x18], eax
call fcn.004052a0
mov esi, eax
add esp, 8
test esi, esi
je 0x4022a0
mov edx, esi
lea eax, [esp + 0x50]
sub edx, eax
test edx, edx
jle 0x4022a0
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x260]
rep stosd dword es:[edi], eax
push edx
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x268]
push edx
stosb byte es:[edi], al
call fcn.00405020
lea eax, [esp + 0x44]
push eax
push esi
call fcn.004048bf
add esp, 0x14
test eax, eax
jne 0x4022a0
lea eax, [esp + 0x20]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402222
lea edi, [esp + 0x260]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402233
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4022a0
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x110]
push 3
push eax
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x5c]
push edx
mov ecx, ebx
call fcn.00401bd0
test eax, eax
je 0x4022a0
cmp eax, 0x20
jne 0x4022a0
push 4
push 0
lea eax, [esp + 0x268]
push eax
lea ecx, [esp + 0x5c]
push ecx
mov ecx, ebx
call fcn.00401bd0
xor edx, edx
xor eax, eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x28], eax
push 0x18
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x54], edx
push 0x18
lea edx, [esp + 0x44]
mov dword [esp + 0x40], eax
push edx
lea eax, [esp + 0x24]
push eax
mov ecx, ebx
call fcn.00401d30
mov esi, eax
cmp esi, 0xea
je 0x4021b0
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x40230d
push edi
call fcn.00404e43
add esp, 4
cmp esi, 0x103
jne 0x402325
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402325
xor esi, esi
jmp 0x402325
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 0x120]
test eax, eax
je 0x4023a8
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x402351
xor eax, 1
push eax
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x160]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4023a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x20
jne 0x4023a8
push 4
push 0
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x26c]
push ecx
mov ecx, ebx
call fcn.00401bd0
mov esi, eax
mov ecx, dword [esp + 0x36c]
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor esi, esi
mov eax, esi
mov ecx, dword [esp + 0x36c]
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x36c]
mov eax, 0x57
call fcn.00404e1d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8