Function at 0x4222cb
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
push ebp
sub esp, 0xb28
lea ebp, [esp - 4]
mov eax, dword [0x484c64]
xor eax, ebp
mov dword [ebp + 0xb28], eax
push 0x28
mov eax, 0x462db1
call fcn.0044ba5a
mov eax, dword [ebp + 0xb3c]
mov ebx, dword [ebp + 0xb34]
mov edi, dword [ebp + 0xb38]
mov esi, dword [ebp + 0xb40]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], esi
call fcn.00421780
push eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 4], 0
test esi, esi
jne 0x42236f
push str.WritePrivateProfileStringA______pFileNameNULL_
push str._s_failed_n
push 0x4866f8
call fcn.00419d26
add esp, 0xc
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xb28]
xor ecx, ebp
call fcn.00447b4c
add ebp, 0xb2c
leave
ret
push esi
call fcn.0044aa00
pop ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
jne 0x422387
push str.WritePrivateProfileStringA______strlen_pFileName___0_
jmp 0x42232f
test ebx, ebx
jne 0x422392
push str.WritePrivateProfileStringA______lpAppNameNULL_
jmp 0x42232f
push ebx
call fcn.0044aa00
pop ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
jne 0x4223aa
push str.WritePrivateProfileStringA______strlen_lpAppName___0_
jmp 0x42232f
push 0
lea ecx, [ebp]
mov dword [ebp + 0x18], 0xf
call fcn.00401600
push esi
mov byte [ebp - 4], 1
call fcn.00403600
test eax, eax
pop ecx
jne 0x4224c8
test edi, edi
je 0x42247f
cmp dword [ebp - 0x1c], eax
je 0x42247f
push 0x46dfa0
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0044cf5c
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x422484
push dword [ebp - 0x14]
push 0x46df9c
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
push ebx
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
push 0x46df98
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
push edi
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
push 0x46df94
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
push 0x46d06c
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422484
push dword [ebp - 0x14]
call fcn.0044ccda
pop ecx
xor esi, esi
inc esi
jmp 0x4224ac
push dword [ebp - 0x1c]
push edi
push ebx
push str.Win9XWritePrivateProfileString__:__Error_writing__s____s_s_to_temp_file
push 0x4866f8
call fcn.00419d26
add esp, 0x14
cmp dword [ebp - 0x14], 0
je 0x4224aa
push dword [ebp - 0x14]
call fcn.0044ccda
pop ecx
xor esi, esi
push 0
push 1
lea ecx, [ebp]
call fcn.00401c10
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x42234c
push 0x46df40
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.0044cf5c
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jne 0x4225a0
mov esi, 0x103
push esi
lea eax, [ebp + 0x81d]
push edi
push eax
mov byte [ebp + 0x81c], 0
call fcn.00447ba0
push esi
lea eax, [ebp + 0x921]
push edi
push eax
mov byte [ebp + 0x920], 0
call fcn.00447ba0
push esi
lea eax, [ebp + 0xa25]
push edi
push eax
mov byte [ebp + 0xa24], 0
call fcn.00447ba0
inc esi
lea eax, [ebp + 0x81c]
push esi
push eax
call fcn.0044cc23
add esp, 0x2c
lea eax, [ebp + 0xa24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp + 0xa24]
push eax
call fcn.0044aa00
test eax, eax
pop ecx
jne 0x42256e
push str.C:WindowsTemp_
lea eax, [ebp + 0xa24]
push esi
push eax
call fcn.00448647
add esp, 0xc
lea eax, [ebp + 0x81d]
push eax
lea eax, [ebp + 0xa24]
push eax
push str._shpz_s
lea eax, [ebp + 0x920]
push esi
push eax
call fcn.00447cf1
add esp, 0x14
lea eax, [ebp + 0x920]
push eax
lea ecx, [ebp]
call fcn.004049f0
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x4225ac
lea eax, [ebp + 4]
push 0x46df20
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0044cf5c
add esp, 0xc
cmp dword [ebp - 0x18], edi
je 0x422a02
cmp dword [ebp - 0x10], edi
je 0x422a02
mov byte [ebp - 0x1d], 0
mov edi, 0x400
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
mov byte [ebp + 0x1c], 0
call fcn.0044c808
add esp, 0xc
test eax, eax
je 0x422866
push 0x3ff
lea eax, [ebp + 0x41c]
push eax
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.00447cd6
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x1c]
push 0x46df1c
push eax
mov byte [ebp + 0x41b], 0
call fcn.00448403
add esp, 0x1c
test eax, eax
je 0x422855
push eax
call fcn.004217ad
mov esi, eax
cmp byte [esi], 0x5b
pop ecx
jne 0x422855
push 0x46df18
push esi
call fcn.0044803e
test eax, eax
pop ecx
pop ecx
je 0x422855
push esi
call fcn.00448a1f
mov esi, eax
mov dword [esp], 0x46df18
push esi
call fcn.0044803e
push esi
mov byte [eax], 0
call fcn.004217ad
push ebx
push eax
call fcn.00448634
add esp, 0x14
test eax, eax
jne 0x422855
cmp dword [ebp - 0x14], eax
jne 0x42275d
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
call fcn.0044c808
movsx eax, byte [ebp + 0x41c]
push eax
lea esi, [ebp + 0x41c]
call fcn.0044a028
add esp, 0x10
jmp 0x422839
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
mov byte [ebp + 0x1c], 0
call fcn.0044c808
push 0x3ff
lea eax, [ebp + 0x41c]
push eax
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.00447cd6
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp + 0x41b], 0
call fcn.004217ad
mov ebx, eax
push 0x46df94
push ebx
call fcn.0044803e
add esp, 0x28
test eax, eax
mov dword [ebp - 0x28], eax
je 0x42272f
push ebx
mov byte [eax], 0
call fcn.004217ad
pop ecx
mov ebx, eax
push dword [ebp - 0x14]
push ebx
call fcn.00448634
mov esi, eax
neg esi
sbb esi, esi
pop ecx
inc esi
cmp dword [ebp - 0x28], 0
pop ecx
je 0x42274b
test esi, esi
jne 0x4227a2
cmp byte [ebx], 0x5b
je 0x4227a2
push dword [ebp - 0x18]
call fcn.0044c7d9
test eax, eax
pop ecx
jne 0x4227a2
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jge 0x4226cb
push str.fputs_line_tmp_
push str._s_failed_n
push 0x4866f8
call fcn.00419d26
push dword [ebp - 0x10]
call fcn.0044ccda
push dword [ebp - 0x18]
call fcn.0044ccda
add esp, 0x14
jmp 0x4224aa
cmp dword [ebp - 0x1c], 0
je 0x422800
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422940
push dword [ebp - 0x10]
push 0x46df94
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422940
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422940
push dword [ebp - 0x10]
push 0x46d06c
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422940
test esi, esi
jne 0x42281d
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422776
mov ebx, dword [ebp - 0x30]
mov byte [ebp - 0x1d], 1
jmp 0x422866
push esi
call fcn.00448a1f
mov esi, eax
movsx eax, byte [esi]
push eax
call fcn.0044a028
pop ecx
pop ecx
test eax, eax
jne 0x422826
cmp byte [esi], 0x5b
je 0x422855
push dword [ebp - 0x18]
call fcn.0044c7d9
test eax, eax
pop ecx
je 0x422699
jmp 0x422866
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.0044cd56
pop ecx
pop ecx
push dword [ebp - 0x18]
call fcn.0044c7d9
test eax, eax
pop ecx
je 0x4225d9
cmp byte [ebp - 0x1d], 0
jne 0x42296d
cmp dword [ebp - 0x14], 0
je 0x42296d
cmp dword [ebp - 0x1c], 0
je 0x42296d
push dword [ebp - 0x10]
push 0x46df04
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422912
push dword [ebp - 0x10]
push ebx
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422912
push dword [ebp - 0x10]
push 0x46df98
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422912
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422912
push dword [ebp - 0x10]
push 0x46df94
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422912
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jl 0x422912
push dword [ebp - 0x10]
push 0x46d06c
call fcn.0044cd56
test eax, eax
pop ecx
pop ecx
jge 0x42296d
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push ebx
push str.Win9XWritePrivateProfileString__:__Error_writing__s____s_s_to_temp_file
push 0x4866f8
call fcn.00419d26
push dword [ebp - 0x10]
call fcn.0044ccda
push dword [ebp - 0x18]
call fcn.0044ccda
add esp, 0x1c
jmp 0x4224aa
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push str.Win9XWritePrivateProfileString___:_Error_writing__s_s_to_temp_file
push 0x4866f8
call fcn.00419d26
push dword [ebp - 0x10]
call fcn.0044ccda
push dword [ebp - 0x18]
call fcn.0044ccda
add esp, 0x18
jmp 0x4224aa
push dword [ebp - 0x18]
call fcn.0044ccda
push dword [ebp - 0x10]
call fcn.0044c429
push dword [ebp - 0x10]
call fcn.0044ccda
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
and dword [ebp - 0x1c], 0
add esp, 0xc
push dword [ebp - 0x2c]
call esi
mov ebx, eax
test ebx, ebx
jne 0x4229e5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 5
jne 0x4229dd
cmp dword [ebp - 0x1c], eax
jge 0x4229dd
call edi
push eax
push str.Win9XWritePrivateProfileString____DeleteFile_failed___GetLastError___d
push 0x4866f8
call fcn.00419d26
add esp, 0xc
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x2c]
inc dword [ebp - 0x1c]
call esi
mov ebx, eax
test ebx, ebx
je 0x4229a3
test ebx, ebx
je 0x4224aa
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x4229f1
lea eax, [ebp + 4]
push dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esi, eax
jmp 0x4224ac
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x422a0e
lea eax, [ebp + 4]
push eax
push str.GetPrivateProfileStringA___fails_calling_fopen_on__s_n
push 0x4866f8
call fcn.0041a1b0
add esp, 0xc
cmp dword [ebp - 0x18], edi
je 0x422a2f
push dword [ebp - 0x18]
call fcn.0044ccda
pop ecx
cmp dword [ebp - 0x10], edi
je 0x4224aa
push dword [ebp - 0x10]
jmp 0x4224a4