Function at 0x402970
Capabilities:
Copy file

Disassembly:
sub esp, 0x624
lea eax, [esp + 0x320]
push ebx
push ebp
push esi
push edi
push eax
push str._apppath_
call fcn.00401da0
mov edi, 0x40b920
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x22c]
mov eax, ecx
mov esi, edi
mov edi, edx
mov bl, 0x5c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x330]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x4029ea
mov al, byte [esp + ecx + 0x32f]
dec ecx
cmp al, bl
je 0x4029df
cmp al, 0x2f
jne 0x4029e6
mov byte [esp + ecx + 0x330], bl
test ecx, ecx
jg 0x4029cf
lea edi, [esp + 0x22c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x402a1a
mov al, byte [esp + ecx + 0x22b]
dec ecx
cmp al, bl
je 0x402a0f
cmp al, 0x2f
jne 0x402a16
mov byte [esp + ecx + 0x22c], bl
test ecx, ecx
jg 0x4029ff
lea ecx, [esp + 0x22c]
lea edx, [esp + 0x330]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x402d5b
lea eax, [esp + 0x22c]
push eax
call fcn.00402d70
add esp, 4
test eax, eax
jne 0x402a5a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x624
ret
lea edi, [esp + 0x330]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov al, byte [esp + ecx + 0x14]
lea edx, [esp + ecx + 0x14]
cmp al, bl
je 0x402ad0
cmp al, 0x2f
je 0x402ad0
mov edi, 0x40b148
or ecx, 0xffffffff
xor eax, eax
lea ebp, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebp
mov ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
lea ebp, [esp + 0x534]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b144
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x114]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__findfirst]
mov ebp, eax
add esp, 8
test ebp, ebp
jle 0x402d5b
mov esi, 0x40b140
lea eax, [esp + 0x128]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402b72
test cl, cl
je 0x402b6e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402b72
add eax, 2
add esi, 2
test cl, cl
jne 0x402b4e
xor eax, eax
jmp 0x402b77
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402d1f
mov esi, 0x40b13c
lea eax, [esp + 0x128]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402baf
test cl, cl
je 0x402bab
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402baf
add eax, 2
add esi, 2
test cl, cl
jne 0x402b8b
xor eax, eax
jmp 0x402bb4
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402d1f
lea edi, [esp + 0x534]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x128]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [esp + 0x114]
mov ecx, edx
and ecx, 3
test al, 0x10
rep movsb byte es:[edi], byte [esi]
jne 0x402d1f
lea edi, [esp + 0x22c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x434]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x434]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov al, byte [esp + ecx + 0x434]
lea edx, [esp + ecx + 0x434]
cmp al, bl
je 0x402cd6
cmp al, 0x2f
je 0x402cd6
mov edi, 0x40b148
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x434]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x128]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov bl, 0x5c
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x402d06
lea edi, [esp + 0x128]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x434]
push 0
lea ecx, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x402d3a
lea edx, [esp + 0x114]
push edx
push ebp
call dword [sym.imp.MSVCRT.dll__findnext]
add esp, 8
test eax, eax
jne 0x402d51
jmp 0x402b42
push ebp
call dword [sym.imp.MSVCRT.dll__findclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x624
ret
push ebp
call dword [sym.imp.MSVCRT.dll__findclose]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x624
ret