Function at 0x100531e0
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.10052210
movzx edx, ax
cmp edx, dword [ebp - 0x18]
je 0x10053227
xor al, al
jmp 0x1005342d
mov ecx, dword [ebp - 8]
call fcn.10052210
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 0x100532a5
mov ecx, dword [ebp - 8]
call fcn.10052210
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.10052210
movzx edx, ax
push edx
push str.PE_Parser:_Error___image_seems_incomplete:___d_sections__PointerToRawData:_0x_x____dump_failed._n
call fcn.1003def0
add esp, 0xc
xor al, al
jmp 0x1005342d
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call fcn.10052880
movzx ecx, al
test ecx, ecx
je 0x1005342a
mov ecx, dword [ebp - 8]
call fcn.10052210
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.10052210
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.10056070
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x10053338
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.10052900
cmp dword [ebp + 8], 0
jne 0x1005342a
push 0
push 0x104f4ee0
push 0x104
push str.TsmamOutput.bin
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005338f
push 0x10309b08
call fcn.1003f670
add esp, 4
xor al, al
jmp 0x1005342d
call fcn.10039430
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
push 0x104f4ee0
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x100533f8
push 0x104
push 0
push 0x104f4ee0
call fcn.1024b810
add esp, 0xc
push 0
push 0x104f4ee0
push 0x104
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x100533e9
push str.saveCompletePeToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003f670
add esp, 4
xor al, al
jmp 0x1005342d
push 0x104f4ee0
call fcn.1003f7b0
add esp, 4
jmp 0x1005342a
push str.saveCompletePeToDisk:_There_was_a_problem_renaming_the_file
call fcn.1003f670
add esp, 4
push 0x104f4ee0
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10053426
push 0x104f4ee0
push str.saveCompletePeToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003f670
add esp, 8
xor al, al
jmp 0x1005342d
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 4