Function at 0x402120
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
sub esp, 0x60c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push ebp
push esi
push edi
lea eax, [esp + 0x51c]
push 0x100
push eax
call ebx
mov edi, str._telephon.ini
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x51c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x100
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 eax, [esp + 0x220]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov edi, str._telephon.tmp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x21c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x40d2bc
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
lea eax, [esp + 0x520]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], 0xffffffff
call fcn.00404b10
mov esi, eax
xor ebx, ebx
add esp, 8
cmp esi, ebx
mov dword [esp + 0x18], esi
jne 0x4021e8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60c
ret 4
lea ecx, [esp + 0x21c]
push 0x40d2b8
push ecx
call fcn.00404b10
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x10], edi
jne 0x40221f
push esi
call fcn.00404a60
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60c
ret 4
push esi
lea edx, [esp + 0x20]
push 0x200
push edx
xor ebp, ebp
call fcn.004049e0
add esp, 0xc
test eax, eax
je 0x4022e9
mov cl, byte [esp + 0x1c]
cmp cl, 0x5b
jne 0x40235f
mov al, byte [esp + 0x1d]
xor edx, edx
cmp al, 0x5d
je 0x402269
mov cl, al
xor eax, eax
mov byte [esp + eax + 0x31c], cl
mov cl, byte [esp + eax + 0x1e]
inc edx
inc eax
cmp cl, 0x5d
jne 0x402257
mov byte [esp + edx + 0x31c], bl
lea esi, [esp + 0x31c]
mov eax, str.Locations
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40234c
cmp cl, bl
je 0x4022a4
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40234c
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40227c
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov ebp, ecx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push 0x40d2a8
push edx
call fcn.004049a0
mov esi, dword [esp + 0x24]
add esp, 0xc
lea eax, [esp + 0x1c]
push esi
push 0x200
push eax
call fcn.004049e0
add esp, 0xc
test eax, eax
jne 0x40223c
mov edi, dword [esp + 0x10]
push esi
call fcn.00404a60
add esp, 4
push edi
call fcn.00404a60
add esp, 4
lea ecx, [esp + 0x51c]
lea edx, [esp + 0x21c]
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [esp + 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x14]
sub eax, ebx
je 0x40233a
dec eax
jne 0x40233a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60c
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60c
ret 4
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
cmp eax, ebx
sete cl
mov ebp, ecx
jmp 0x4022af
cmp ebp, 1
jne 0x4022af
xor eax, eax
xor edx, edx
cmp cl, 0x3d
je 0x402390
lea esi, [esp + 0x31c]
lea edi, [esp + 0x1c]
sub esi, edi
lea edi, [esp + eax + 0x1c]
inc eax
inc edx
mov byte [edi + esi], cl
mov cl, byte [esp + eax + 0x1c]
cmp cl, 0x3d
jne 0x40237e
mov byte [esp + edx + 0x31c], bl
inc eax
lea edi, [esp + 0x31c]
mov esi, str.Location0
mov dl, byte [esi]
mov cl, dl
cmp dl, byte [edi]
jne 0x4023c8
cmp cl, bl
je 0x4023c4
mov dl, byte [esi + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x4023c8
add esi, 2
add edi, 2
cmp cl, bl
jne 0x4023a4
xor ecx, ecx
jmp 0x4023cd
sbb ecx, ecx
sbb ecx, 0xffffffff
cmp ecx, ebx
jne 0x4022af
mov ecx, 0xa
cmp byte [esp + eax + 0x1c], 0x2c
je 0x4023eb
mov dl, byte [esp + eax + 0x1d]
inc eax
cmp dl, 0x2c
jne 0x4023e1
inc eax
dec ecx
jne 0x4023da
lea esi, [esp + eax + 0x1c]
lea ecx, [esp + 0x31c]
push ecx
mov byte [esp + 0x321], bl
mov al, byte [esi]
mov byte [esp + 0x320], al
call fcn.00404840
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x624]
add esp, 4
sub eax, ebx
je 0x402428
dec eax
mov byte [esi], 0x30
jmp 0x40242b
mov byte [esi], 0x31
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push edx
push 0x40d2a8
push eax
jmp 0x4022be