Function at 0x401240
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x422bcc
lea eax, [ebp - 0x88]
push str.sta.conf
push eax
call fcn.00406eef
mov eax, dword [ebp - 0x88]
add esp, 0xc
test eax, eax
jne 0x4012a0
push str.Failed_to_open_config_file_n
call fcn.00401020
push 0x422bec
call fcn.00406e2d
add esp, 8
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401539
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x84]
mov word [ebp - 0x14], 0
push ecx
xorps xmm0, xmm0
mov word [ebp - 8], 0
push 0x422bf4
push eax
movq qword [ebp - 0x1c], xmm0
movq qword [ebp - 0x10], xmm0
call fcn.00401050
lea eax, [ebp - 0x1c]
push eax
push 0x422bbc
push dword [ebp - 0x88]
call fcn.00401050
lea eax, [ebp - 0x10]
push eax
push 0x422bbc
push dword [ebp - 0x88]
call fcn.00401050
push 0x422bcc
lea eax, [ebp - 0x8c]
push str.C:_boot.img
push eax
call fcn.00406eef
mov eax, dword [ebp - 0x8c]
add esp, 0x30
test eax, eax
jne 0x401340
push str.No_boot.img_found_n
call fcn.00401020
push 0x422bec
call fcn.00406e2d
add esp, 8
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401539
mov esp, ebp
pop ebp
ret
push esi
push 2
push 0
push eax
call fcn.00405046
push dword [ebp - 0x8c]
call fcn.00404a8c
push dword [ebp - 0x8c]
mov esi, eax
call fcn.00404d2d
mov eax, dword [ebp - 0x84]
add esp, 0x14
cmp esi, eax
je 0x40139c
push eax
push str.boot.img_has_a_diffren_size_than_expected__d__n
call fcn.00401020
push 0x422bec
call fcn.00406e2d
add esp, 0xc
mov eax, 3
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401539
mov esp, ebp
pop ebp
ret
call fcn.00401080
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x10], 0x73
mov eax, dword [eax + 4]
test eax, eax
jne 0x401443
push 0x64
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00402440
push str.dd.exe_bs16M_ifC:_boot.img_of_dev_
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x80]
push eax
call fcn.00406e2d
lea eax, [ebp - 0x1c]
push eax
push 0x422bbc
call fcn.00401020
push 0x64
lea eax, [ebp - 0x80]
push 0
push eax
call fcn.00402440
push str.dd.exe_bs16M_ifC:_boot.img_of_dev_
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
add esp, 0x48
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x80]
push eax
call fcn.00406e2d
lea eax, [ebp - 0x10]
push eax
push 0x422bbc
call fcn.00401020
add esp, 0x18
jmp 0x4014e9
mov ecx, 0x422c48
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401468
test dl, dl
je 0x401464
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401468
add eax, 2
add ecx, 2
test dl, dl
jne 0x401448
xor eax, eax
jmp 0x40146d
sbb eax, eax
or eax, 1
push 0x64
test eax, eax
lea eax, [ebp - 0x80]
push 0
push eax
jne 0x4014ab
call fcn.00402440
push str.dd.exe_bs16M_ifC:_boot.img_of_dev_
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x80]
push eax
call fcn.00406e2d
lea eax, [ebp - 0x10]
jmp 0x4014db
call fcn.00402440
push str.dd.exe_bs16M_ifC:_boot.img_of_dev_
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x80]
push 0x64
push eax
call fcn.0040bbb0
lea eax, [ebp - 0x80]
push eax
call fcn.00406e2d
lea eax, [ebp - 0x1c]
push eax
push 0x422bbc
call fcn.00401020
add esp, 0x30
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 4
push 0
push 0x422c4c
call esi
push 4
push 0
push 0x422c54
call esi
push 4
push 0
push 0x422c60
call esi
push 4
push 0
push 0x422c70
call esi
push str.shutdown__r__t_00
call fcn.00406e2d
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00401539
mov esp, ebp
pop ebp
ret