Function at 0x10052280
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.100512b0
movzx edx, ax
cmp edx, dword [ebp - 0x18]
je 0x100522c7
xor al, al
jmp 0x100524cd
mov ecx, dword [ebp - 8]
call fcn.100512b0
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 0x10052345
mov ecx, dword [ebp - 8]
call fcn.100512b0
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.100512b0
movzx edx, ax
push edx
push str.PE_Parser:_Error___image_seems_incomplete:___d_sections__PointerToRawData:_0x_x____dump_failed._n
call fcn.1003cfa0
add esp, 0xc
xor al, al
jmp 0x100524cd
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call fcn.10051920
movzx ecx, al
test ecx, ecx
je 0x100524ca
mov ecx, dword [ebp - 8]
call fcn.100512b0
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.100512b0
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.10055090
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x100523d8
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.100519a0
cmp dword [ebp + 8], 0
jne 0x100524ca
push 0
push 0x104f33a8
push 0x104
push str.TsmamOutput.bin
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005242f
push 0x10308a38
call fcn.1003e700
add esp, 4
xor al, al
jmp 0x100524cd
call fcn.10038530
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
push 0x104f33a8
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x10052498
push 0x104
push 0
push 0x104f33a8
call fcn.1024a480
add esp, 0xc
push 0
push 0x104f33a8
push 0x104
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x10052489
push str.saveCompletePeToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003e700
add esp, 4
xor al, al
jmp 0x100524cd
push 0x104f33a8
call fcn.1003e840
add esp, 4
jmp 0x100524ca
push str.saveCompletePeToDisk:_There_was_a_problem_renaming_the_file
call fcn.1003e700
add esp, 4
push 0x104f33a8
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x100524c6
push 0x104f33a8
push str.saveCompletePeToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003e700
add esp, 8
xor al, al
jmp 0x100524cd
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 4