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

Disassembly:
push ebp
sub esp, 0xb28
lea ebp, [esp - 4]
mov eax, dword [0x517774]
xor eax, ebp
mov dword [ebp + 0xb28], eax
push 0x28
mov eax, 0x4caf32
call fcn.0049aeba
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.0042e183
push eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 4], 0
test esi, esi
jne 0x4318fa
push str.WritePrivateProfileStringA______pFileNameNULL_
push str._s_failed_n
push 0x519518
call fcn.00426fe1
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.004974ba
add ebp, 0xb2c
leave
ret
push esi
call fcn.004998a0
pop ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
jne 0x431912
push str.WritePrivateProfileStringA______strlen_pFileName___0_
jmp 0x4318ba
test ebx, ebx
jne 0x43191d
push str.WritePrivateProfileStringA______lpAppNameNULL_
jmp 0x4318ba
push ebx
call fcn.004998a0
pop ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
jne 0x431935
push str.WritePrivateProfileStringA______strlen_lpAppName___0_
jmp 0x4318ba
push 0
lea ecx, [ebp]
mov dword [ebp + 0x18], 0xf
call fcn.00401260
push esi
mov byte [ebp - 4], 1
call fcn.0040b500
pop ecx
test eax, eax
jne 0x431a53
test edi, edi
je 0x431a0a
cmp dword [ebp - 0x1c], eax
je 0x431a0a
push 0x4d85cc
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.0049c887
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x431a0f
push dword [ebp - 0x14]
push 0x4de04c
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
push ebx
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
push 0x4de048
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
push edi
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
push 0x4de044
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
push 0x4dca18
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431a0f
push dword [ebp - 0x14]
call fcn.0049c621
pop ecx
xor esi, esi
inc esi
jmp 0x431a37
push dword [ebp - 0x1c]
push edi
push ebx
push str.Win9XWritePrivateProfileString__:__Error_writing__s____s_s_to_temp_file
push 0x519518
call fcn.00426fe1
add esp, 0x14
cmp dword [ebp - 0x14], 0
je 0x431a35
push dword [ebp - 0x14]
call fcn.0049c621
pop ecx
xor esi, esi
push 0
push 1
lea ecx, [ebp]
call fcn.00401a30
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x4318d7
push 0x4ddff0
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.0049c887
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jne 0x431b2b
mov esi, 0x103
push esi
lea eax, [ebp + 0x81d]
push edi
push eax
mov byte [ebp + 0x81c], 0
call fcn.00497680
push esi
lea eax, [ebp + 0x921]
push edi
push eax
mov byte [ebp + 0x920], 0
call fcn.00497680
push esi
lea eax, [ebp + 0xa25]
push edi
push eax
mov byte [ebp + 0xa24], 0
call fcn.00497680
inc esi
lea eax, [ebp + 0x81c]
push esi
push eax
call fcn.0049c2ee
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.004998a0
pop ecx
test eax, eax
jne 0x431af9
push str.C:WindowsTemp_
lea eax, [ebp + 0xa24]
push esi
push eax
call fcn.00497fe1
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.00497562
add esp, 0x14
lea eax, [ebp + 0x920]
push eax
lea ecx, [ebp]
call fcn.004022d0
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x431b37
lea eax, [ebp + 4]
push 0x4ddfd0
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0049c887
add esp, 0xc
cmp dword [ebp - 0x18], edi
je 0x431f8d
cmp dword [ebp - 0x10], edi
je 0x431f8d
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.0049bee9
add esp, 0xc
test eax, eax
je 0x431df1
push 0x3ff
lea eax, [ebp + 0x41c]
push eax
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.004976fa
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x1c]
push 0x4ddfcc
push eax
mov byte [ebp + 0x41b], 0
call fcn.00498c3e
add esp, 0x1c
test eax, eax
je 0x431de0
push eax
call fcn.0042e1c5
mov esi, eax
cmp byte [esi], 0x5b
pop ecx
jne 0x431de0
push 0x4ddfc8
push esi
call fcn.0049858b
pop ecx
pop ecx
test eax, eax
je 0x431de0
push esi
call fcn.00497f9b
mov esi, eax
mov dword [esp], 0x4ddfc8
push esi
call fcn.0049858b
push esi
mov byte [eax], 0
call fcn.0042e1c5
push ebx
push eax
call fcn.00497f5d
add esp, 0x14
test eax, eax
jne 0x431de0
cmp dword [ebp - 0x14], eax
jne 0x431ce8
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
call fcn.0049bee9
movsx eax, byte [ebp + 0x41c]
push eax
lea esi, [ebp + 0x41c]
call fcn.0049b91a
add esp, 0x10
jmp 0x431dc4
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
mov byte [ebp + 0x1c], 0
call fcn.0049bee9
push 0x3ff
lea eax, [ebp + 0x41c]
push eax
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.004976fa
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp + 0x41b], 0
call fcn.0042e1c5
mov ebx, eax
push 0x4de044
push ebx
call fcn.0049858b
add esp, 0x28
mov dword [ebp - 0x28], eax
test eax, eax
je 0x431cba
push ebx
mov byte [eax], 0
call fcn.0042e1c5
pop ecx
mov ebx, eax
push dword [ebp - 0x14]
push ebx
call fcn.00497f5d
mov esi, eax
neg esi
sbb esi, esi
pop ecx
inc esi
cmp dword [ebp - 0x28], 0
pop ecx
je 0x431cd6
test esi, esi
jne 0x431d2d
cmp byte [ebx], 0x5b
je 0x431d2d
push dword [ebp - 0x18]
call fcn.0049be81
pop ecx
test eax, eax
jne 0x431d2d
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jge 0x431c56
push str.fputs_line_tmp_
push str._s_failed_n
push 0x519518
call fcn.00426fe1
push dword [ebp - 0x10]
call fcn.0049c621
push dword [ebp - 0x18]
call fcn.0049c621
add esp, 0x14
jmp 0x431a35
cmp dword [ebp - 0x1c], 0
je 0x431d8b
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431ecb
push dword [ebp - 0x10]
push 0x4de044
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431ecb
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431ecb
push dword [ebp - 0x10]
push 0x4dca18
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431ecb
test esi, esi
jne 0x431da8
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431d01
mov ebx, dword [ebp - 0x30]
mov byte [ebp - 0x1d], 1
jmp 0x431df1
push esi
call fcn.00497f9b
mov esi, eax
movsx eax, byte [esi]
push eax
call fcn.0049b91a
pop ecx
pop ecx
test eax, eax
jne 0x431db1
cmp byte [esi], 0x5b
je 0x431de0
push dword [ebp - 0x18]
call fcn.0049be81
pop ecx
test eax, eax
je 0x431c24
jmp 0x431df1
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.0049c69d
pop ecx
pop ecx
push dword [ebp - 0x18]
call fcn.0049be81
pop ecx
test eax, eax
je 0x431b64
cmp byte [ebp - 0x1d], 0
jne 0x431ef8
cmp dword [ebp - 0x14], 0
je 0x431ef8
cmp dword [ebp - 0x1c], 0
je 0x431ef8
push dword [ebp - 0x10]
push 0x4ddfb4
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431e9d
push dword [ebp - 0x10]
push ebx
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431e9d
push dword [ebp - 0x10]
push 0x4de048
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431e9d
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431e9d
push dword [ebp - 0x10]
push 0x4de044
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431e9d
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jl 0x431e9d
push dword [ebp - 0x10]
push 0x4dca18
call fcn.0049c69d
pop ecx
pop ecx
test eax, eax
jge 0x431ef8
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push ebx
push str.Win9XWritePrivateProfileString__:__Error_writing__s____s_s_to_temp_file
push 0x519518
call fcn.00426fe1
push dword [ebp - 0x10]
call fcn.0049c621
push dword [ebp - 0x18]
call fcn.0049c621
add esp, 0x1c
jmp 0x431a35
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push str.Win9XWritePrivateProfileString___:_Error_writing__s_s_to_temp_file
push 0x519518
call fcn.00426fe1
push dword [ebp - 0x10]
call fcn.0049c621
push dword [ebp - 0x18]
call fcn.0049c621
add esp, 0x18
jmp 0x431a35
push dword [ebp - 0x18]
call fcn.0049c621
push dword [ebp - 0x10]
call fcn.0049be25
push dword [ebp - 0x10]
call fcn.0049c621
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 0x431f70
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 5
jne 0x431f68
cmp dword [ebp - 0x1c], eax
jge 0x431f68
call edi
push eax
push str.Win9XWritePrivateProfileString____DeleteFile_failed___GetLastError___d
push 0x519518
call fcn.00426fe1
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 0x431f2e
test ebx, ebx
je 0x431a35
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x431f7c
lea eax, [ebp + 4]
push dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esi, eax
jmp 0x431a37
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x431f99
lea eax, [ebp + 4]
push eax
push str.GetPrivateProfileStringA___fails_calling_fopen_on__s_n
push 0x519518
call fcn.00427473
add esp, 0xc
cmp dword [ebp - 0x18], edi
je 0x431fba
push dword [ebp - 0x18]
call fcn.0049c621
pop ecx
cmp dword [ebp - 0x10], edi
je 0x431a35
push dword [ebp - 0x10]
jmp 0x431a2f