Function at 0x10052780
Capabilities:
Clear file content
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 8], ecx
mov byte [ebp - 1], 1
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx + 4]
sub eax, dword [edx]
cdq
mov ecx, 0x34
idiv ecx
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 8]
call fcn.100517b0
movzx edx, ax
cmp edx, dword [ebp - 0x18]
je 0x100527c7
xor al, al
jmp 0x100529cd
mov ecx, dword [ebp - 8]
call fcn.100517b0
movzx eax, ax
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x20], ecx
imul edx, dword [ebp - 0x1c], 0x34
mov eax, dword [ebp - 0x20]
add edx, dword [eax]
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x24]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x14]
cmp ecx, dword [edx + 0x3c]
jae 0x10052845
mov ecx, dword [ebp - 8]
call fcn.100517b0
movzx edx, ax
sub edx, 1
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
imul ecx, dword [ebp - 0x28], 0x34
mov edx, dword [ebp - 0x2c]
add ecx, dword [edx]
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x14]
push ecx
mov ecx, dword [ebp - 8]
call fcn.100517b0
movzx edx, ax
push edx
push str.PE_Parser:_Error___image_seems_incomplete:___d_sections__PointerToRawData:_0x_x____dump_failed._n
call fcn.1003d460
add esp, 0xc
xor al, al
jmp 0x100529cd
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call fcn.10051e20
movzx ecx, al
test ecx, ecx
je 0x100529ca
mov ecx, dword [ebp - 8]
call fcn.100517b0
movzx edx, ax
sub edx, 1
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x38], eax
imul ecx, dword [ebp - 0x34], 0x34
mov edx, dword [ebp - 0x38]
add ecx, dword [edx]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 8]
call fcn.100517b0
movzx eax, ax
sub eax, 1
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x40], ecx
imul edx, dword [ebp - 0x3c], 0x34
mov eax, dword [ebp - 0x40]
add edx, dword [eax]
mov dword [ebp - 0x48], edx
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x48]
add edx, dword [eax + 0x10]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x3c]
push edx
call fcn.10055610
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x100528d8
mov byte [ebp - 1], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 8]
call fcn.10051ea0
cmp dword [ebp + 8], 0
jne 0x100529ca
push 0
push 0x104f3570
push 0x104
push str.TsmamOutput.bin
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005292f
push 0x10308a58
call fcn.1003ebe0
add esp, 4
xor al, al
jmp 0x100529cd
call fcn.100389b0
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
push 0x104f3570
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x10052998
push 0x104
push 0
push 0x104f3570
call fcn.1024a9c0
add esp, 0xc
push 0
push 0x104f3570
push 0x104
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x10052989
push str.saveCompletePeToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003ebe0
add esp, 4
xor al, al
jmp 0x100529cd
push 0x104f3570
call fcn.1003ed30
add esp, 4
jmp 0x100529ca
push str.saveCompletePeToDisk:_There_was_a_problem_renaming_the_file
call fcn.1003ebe0
add esp, 4
push 0x104f3570
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x100529c6
push 0x104f3570
push str.saveCompletePeToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003ebe0
add esp, 8
xor al, al
jmp 0x100529cd
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 4