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

Disassembly:
push ebp
sub esp, 0xb28
lea ebp, [esp - 4]
mov eax, dword [0x44bd40]
xor eax, ebp
mov dword [ebp + 0xb28], eax
push 0x28
mov eax, 0x439660
call fcn.0042501a
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.0040aa74
push eax
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 4], 0
test esi, esi
jne 0x40b657
push str.WritePrivateProfileStringA______pFileNameNULL_
push str._s_failed_n
push 0x44d160
call fcn.00406a88
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.00421e14
add ebp, 0xb2c
leave
ret
push esi
call fcn.00423fc0
pop ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
jne 0x40b66f
push str.WritePrivateProfileStringA______strlen_pFileName___0_
jmp 0x40b617
test ebx, ebx
jne 0x40b67a
push str.WritePrivateProfileStringA______lpAppNameNULL_
jmp 0x40b617
push ebx
call fcn.00423fc0
pop ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
jne 0x40b692
push str.WritePrivateProfileStringA______strlen_lpAppName___0_
jmp 0x40b617
push 0
lea ecx, [ebp]
mov dword [ebp + 0x18], 0xf
call fcn.00401900
push esi
mov byte [ebp - 4], 1
call fcn.0040aa07
test eax, eax
pop ecx
jne 0x40b7b0
test edi, edi
je 0x40b767
cmp dword [ebp - 0x1c], eax
je 0x40b767
push 0x43e670
lea eax, [ebp - 0x14]
push esi
push eax
call fcn.004263c9
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x40b76c
push dword [ebp - 0x14]
push 0x43e66c
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
push ebx
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
push 0x43e668
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
push edi
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
push 0x43e664
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
push 0x43dfc0
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40b76c
push dword [ebp - 0x14]
call fcn.00426147
pop ecx
xor esi, esi
inc esi
jmp 0x40b794
push dword [ebp - 0x1c]
push edi
push ebx
push str.Win9XWritePrivateProfileString__:__Error_writing__s____s_s_to_temp_file
push 0x44d160
call fcn.00406a88
add esp, 0x14
cmp dword [ebp - 0x14], 0
je 0x40b792
push dword [ebp - 0x14]
call fcn.00426147
pop ecx
xor esi, esi
push 0
push 1
lea ecx, [ebp]
call fcn.00401ec0
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x40b634
push 0x43e610
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.004263c9
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jne 0x40b888
mov esi, 0x103
push esi
lea eax, [ebp + 0x81d]
push edi
push eax
mov byte [ebp + 0x81c], 0
call fcn.00421e30
push esi
lea eax, [ebp + 0x921]
push edi
push eax
mov byte [ebp + 0x920], 0
call fcn.00421e30
push esi
lea eax, [ebp + 0xa25]
push edi
push eax
mov byte [ebp + 0xa24], 0
call fcn.00421e30
inc esi
lea eax, [ebp + 0x81c]
push esi
push eax
call fcn.00426090
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.00423fc0
test eax, eax
pop ecx
jne 0x40b856
push str.C:WindowsTemp_
lea eax, [ebp + 0xa24]
push esi
push eax
call fcn.00421daf
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.00422cc0
add esp, 0x14
lea eax, [ebp + 0x920]
push eax
lea ecx, [ebp]
call fcn.00403400
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x40b894
lea eax, [ebp + 4]
push 0x43e5f0
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004263c9
add esp, 0xc
cmp dword [ebp - 0x18], edi
je 0x40bcea
cmp dword [ebp - 0x10], edi
je 0x40bcea
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.00425c75
add esp, 0xc
test eax, eax
je 0x40bb4e
push 0x3ff
lea eax, [ebp + 0x41c]
push eax
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.00422552
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x1c]
push 0x43e5ec
push eax
mov byte [ebp + 0x41b], 0
call fcn.004227bc
add esp, 0x1c
test eax, eax
je 0x40bb3d
push eax
call fcn.0040aaa1
mov esi, eax
cmp byte [esi], 0x5b
pop ecx
jne 0x40bb3d
push 0x43e5e8
push esi
call fcn.0042569a
test eax, eax
pop ecx
pop ecx
je 0x40bb3d
push esi
call fcn.00422c49
mov esi, eax
mov dword [esp], 0x43e5e8
push esi
call fcn.0042569a
push esi
mov byte [eax], 0
call fcn.0040aaa1
push ebx
push eax
call fcn.004229ed
add esp, 0x14
test eax, eax
jne 0x40bb3d
cmp dword [ebp - 0x14], eax
jne 0x40ba45
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
call fcn.00425c75
movsx eax, byte [ebp + 0x41c]
push eax
lea esi, [ebp + 0x41c]
call fcn.00425a5e
add esp, 0x10
jmp 0x40bb21
push dword [ebp - 0x18]
lea eax, [ebp + 0x41c]
push edi
push eax
mov byte [ebp + 0x41c], 0
mov byte [ebp + 0x1c], 0
call fcn.00425c75
push 0x3ff
lea eax, [ebp + 0x41c]
push eax
lea eax, [ebp + 0x1c]
push edi
push eax
call fcn.00422552
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp + 0x41b], 0
call fcn.0040aaa1
mov ebx, eax
push 0x43e664
push ebx
call fcn.0042569a
add esp, 0x28
test eax, eax
mov dword [ebp - 0x28], eax
je 0x40ba17
push ebx
mov byte [eax], 0
call fcn.0040aaa1
pop ecx
mov ebx, eax
push dword [ebp - 0x14]
push ebx
call fcn.004229ed
mov esi, eax
neg esi
sbb esi, esi
pop ecx
inc esi
cmp dword [ebp - 0x28], 0
pop ecx
je 0x40ba33
test esi, esi
jne 0x40ba8a
cmp byte [ebx], 0x5b
je 0x40ba8a
push dword [ebp - 0x18]
call fcn.00425c46
test eax, eax
pop ecx
jne 0x40ba8a
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jge 0x40b9b3
push str.fputs_line_tmp_
push str._s_failed_n
push 0x44d160
call fcn.00406a88
push dword [ebp - 0x10]
call fcn.00426147
push dword [ebp - 0x18]
call fcn.00426147
add esp, 0x14
jmp 0x40b792
cmp dword [ebp - 0x1c], 0
je 0x40bae8
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bc28
push dword [ebp - 0x10]
push 0x43e664
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bc28
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bc28
push dword [ebp - 0x10]
push 0x43dfc0
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bc28
test esi, esi
jne 0x40bb05
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40ba5e
mov ebx, dword [ebp - 0x30]
mov byte [ebp - 0x1d], 1
jmp 0x40bb4e
push esi
call fcn.00422c49
mov esi, eax
movsx eax, byte [esi]
push eax
call fcn.00425a5e
pop ecx
pop ecx
test eax, eax
jne 0x40bb0e
cmp byte [esi], 0x5b
je 0x40bb3d
push dword [ebp - 0x18]
call fcn.00425c46
test eax, eax
pop ecx
je 0x40b981
jmp 0x40bb4e
push dword [ebp - 0x10]
lea eax, [ebp + 0x41c]
push eax
call fcn.004261c3
pop ecx
pop ecx
push dword [ebp - 0x18]
call fcn.00425c46
test eax, eax
pop ecx
je 0x40b8c1
cmp byte [ebp - 0x1d], 0
jne 0x40bc55
cmp dword [ebp - 0x14], 0
je 0x40bc55
cmp dword [ebp - 0x1c], 0
je 0x40bc55
push dword [ebp - 0x10]
push 0x43e5d4
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bbfa
push dword [ebp - 0x10]
push ebx
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bbfa
push dword [ebp - 0x10]
push 0x43e668
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bbfa
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bbfa
push dword [ebp - 0x10]
push 0x43e664
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bbfa
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jl 0x40bbfa
push dword [ebp - 0x10]
push 0x43dfc0
call fcn.004261c3
test eax, eax
pop ecx
pop ecx
jge 0x40bc55
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push ebx
push str.Win9XWritePrivateProfileString__:__Error_writing__s____s_s_to_temp_file
push 0x44d160
call fcn.00406a88
push dword [ebp - 0x10]
call fcn.00426147
push dword [ebp - 0x18]
call fcn.00426147
add esp, 0x1c
jmp 0x40b792
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push str.Win9XWritePrivateProfileString___:_Error_writing__s_s_to_temp_file
push 0x44d160
call fcn.00406a88
push dword [ebp - 0x10]
call fcn.00426147
push dword [ebp - 0x18]
call fcn.00426147
add esp, 0x18
jmp 0x40b792
push dword [ebp - 0x18]
call fcn.00426147
push dword [ebp - 0x10]
call fcn.00425bea
push dword [ebp - 0x10]
call fcn.00426147
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 0x40bccd
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 5
jne 0x40bcc5
cmp dword [ebp - 0x1c], eax
jge 0x40bcc5
call edi
push eax
push str.Win9XWritePrivateProfileString____DeleteFile_failed___GetLastError___d
push 0x44d160
call fcn.00406a88
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 0x40bc8b
test ebx, ebx
je 0x40b792
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x40bcd9
lea eax, [ebp + 4]
push dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esi, eax
jmp 0x40b794
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x40bcf6
lea eax, [ebp + 4]
push eax
push str.GetPrivateProfileStringA___fails_calling_fopen_on__s_n
push 0x44d160
call fcn.00406f12
add esp, 0xc
cmp dword [ebp - 0x18], edi
je 0x40bd17
push dword [ebp - 0x18]
call fcn.00426147
pop ecx
cmp dword [ebp - 0x10], edi
je 0x40b792
push dword [ebp - 0x10]
jmp 0x40b78c