Function at 0x100522d0
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.10051300
movzx edx, ax
cmp edx, dword [ebp - 0x18]
je 0x10052317
xor al, al
jmp 0x1005251d
mov ecx, dword [ebp - 8]
call fcn.10051300
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 0x10052395
mov ecx, dword [ebp - 8]
call fcn.10051300
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.10051300
movzx edx, ax
push edx
push str.PE_Parser:_Error___image_seems_incomplete:___d_sections__PointerToRawData:_0x_x____dump_failed._n
call fcn.1003cfe0
add esp, 0xc
xor al, al
jmp 0x1005251d
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call fcn.10051970
movzx ecx, al
test ecx, ecx
je 0x1005251a
mov ecx, dword [ebp - 8]
call fcn.10051300
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.10051300
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.10055160
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x10052428
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.100519f0
cmp dword [ebp + 8], 0
jne 0x1005251a
push 0
push 0x104f33c8
push 0x104
push str.TsmamOutput.bin
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005247f
push 0x10308a38
call fcn.1003e760
add esp, 4
xor al, al
jmp 0x1005251d
call fcn.10038530
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
push 0x104f33c8
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x100524e8
push 0x104
push 0
push 0x104f33c8
call fcn.1024a480
add esp, 0xc
push 0
push 0x104f33c8
push 0x104
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x100524d9
push str.saveCompletePeToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003e760
add esp, 4
xor al, al
jmp 0x1005251d
push 0x104f33c8
call fcn.1003e8a0
add esp, 4
jmp 0x1005251a
push str.saveCompletePeToDisk:_There_was_a_problem_renaming_the_file
call fcn.1003e760
add esp, 4
push 0x104f33c8
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10052516
push 0x104f33c8
push str.saveCompletePeToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003e760
add esp, 8
xor al, al
jmp 0x1005251d
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 4