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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push esi
mov dword [ebp - 0x10], ecx
mov byte [ebp - 1], 1
mov byte [ebp - 2], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov eax, dword [ecx + 4]
sub eax, dword [edx]
cdq
mov ecx, 0x34
idiv ecx
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x10]
call fcn.10051300
movzx edx, ax
cmp edx, dword [ebp - 0x24]
je 0x10051d13
xor al, al
jmp 0x100522bc
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.10051970
movzx ecx, al
test ecx, ecx
je 0x100522b9
mov dword [ebp - 0x14], 0x40
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
push ecx
call fcn.10055160
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10051d5a
mov byte [ebp - 1], 0
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x20], 0
je 0x10051db0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x1c], 0
je 0x10051db0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x1c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
push ecx
call fcn.10055160
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10051da7
mov byte [ebp - 1], 0
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
call fcn.10050510
movzx ecx, al
test ecx, ecx
je 0x10051dc8
mov dword [ebp - 0x14], 0xf8
jmp 0x10051dcf
mov dword [ebp - 0x14], 0x108
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x24]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
push ecx
call fcn.10055160
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10051df8
mov byte [ebp - 1], 0
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0x28
xor ecx, ecx
mov word [ebp - 0xc], cx
jmp 0x10051e1c
mov dx, word [ebp - 0xc]
add dx, 1
mov word [ebp - 0xc], dx
movzx esi, word [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
call fcn.10051300
movzx eax, ax
cmp esi, eax
jge 0x10051e77
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
movzx edx, word [ebp - 0xc]
imul eax, edx, 0x34
mov ecx, dword [ebp - 0x28]
add eax, dword [ecx]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x3c]
push eax
call fcn.10055160
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x10051e6c
mov byte [ebp - 1], 0
jmp 0x10051e77
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
jmp 0x10051e10
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x48], 0
je 0x10051ebb
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x48]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x3c]
push edx
call fcn.10055160
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x10051eb2
mov byte [ebp - 1], 0
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
xor edx, edx
mov word [ebp - 8], dx
jmp 0x10051ecf
mov ax, word [ebp - 8]
add ax, 1
mov word [ebp - 8], ax
movzx esi, word [ebp - 8]
mov ecx, dword [ebp - 0x10]
call fcn.10051300
movzx ecx, ax
cmp esi, ecx
jge 0x100520aa
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x30], edx
movzx eax, word [ebp - 8]
imul ecx, eax, 0x34
mov edx, dword [ebp - 0x30]
add ecx, dword [edx]
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0x14], 0
jne 0x10051f06
jmp 0x10051ec3
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x38], ecx
movzx edx, word [ebp - 8]
imul eax, edx, 0x34
mov ecx, dword [ebp - 0x38]
add eax, dword [ecx]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx + 0x14]
cmp eax, dword [ebp - 0x18]
jbe 0x10051f77
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x40], ecx
movzx edx, word [ebp - 8]
imul eax, edx, 0x34
mov ecx, dword [ebp - 0x40]
add eax, dword [ecx]
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 0x14]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
push ecx
mov ecx, dword [ebp - 0x10]
call fcn.10052530
movzx edx, al
test edx, edx
jne 0x10051f6e
mov byte [ebp - 1], 0
jmp 0x100520aa
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x48], ecx
movzx edx, word [ebp - 8]
imul eax, edx, 0x34
mov ecx, dword [ebp - 0x48]
add eax, dword [ecx]
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx + 0x2c]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x100520a5
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x50], ecx
movzx edx, word [ebp - 8]
imul eax, edx, 0x34
mov ecx, dword [ebp - 0x50]
add eax, dword [ecx]
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x54], edx
movzx eax, word [ebp - 8]
imul ecx, eax, 0x34
mov edx, dword [ebp - 0x54]
add ecx, dword [edx]
mov dword [ebp - 0x5c], ecx
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0x28]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x3c]
push eax
call fcn.10055160
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x10051ffa
mov byte [ebp - 1], 0
jmp 0x100520aa
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
mov byte [ebp - 2], 1
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x60], eax
movzx ecx, word [ebp - 8]
imul edx, ecx, 0x34
mov eax, dword [ebp - 0x60]
add edx, dword [eax]
mov dword [ebp - 0x68], edx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x64], ecx
movzx edx, word [ebp - 8]
imul eax, edx, 0x34
mov ecx, dword [ebp - 0x64]
add eax, dword [ecx]
mov dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x6c]
mov ecx, dword [edx + 0x2c]
cmp ecx, dword [eax + 0x10]
jae 0x100520a5
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x70], edx
movzx eax, word [ebp - 8]
imul ecx, eax, 0x34
mov edx, dword [ebp - 0x70]
add ecx, dword [edx]
mov dword [ebp - 0x78], ecx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x74], eax
movzx ecx, word [ebp - 8]
imul edx, ecx, 0x34
mov eax, dword [ebp - 0x74]
add edx, dword [eax]
mov dword [ebp - 0x7c], edx
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x7c]
mov eax, dword [ecx + 0x10]
sub eax, dword [edx + 0x2c]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
push ecx
mov ecx, dword [ebp - 0x10]
call fcn.10052530
movzx edx, al
test edx, edx
jne 0x1005209c
mov byte [ebp - 1], 0
jmp 0x100520aa
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
jmp 0x10051ec3
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x30], 0
je 0x100520f7
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x2c], 0
je 0x100520f7
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x30]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x2c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
push ecx
call fcn.10055160
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x100520ee
mov byte [ebp - 1], 0
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0x10]
call fcn.100519f0
movzx edx, byte [ebp - 2]
test edx, edx
jne 0x10052124
xor al, al
jmp 0x100522bc
cmp dword [ebp + 8], 0
jne 0x100522b9
push 0
push 0x104f33c8
push 0x104
push 0x10308798
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005215d
push 0x103087a8
call fcn.1003e760
add esp, 4
xor al, al
jmp 0x100522bc
call fcn.10038530
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
push 0x104f33c8
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x100521cc
push 0x104
push 0
push 0x104f33c8
call fcn.1024a480
add esp, 0xc
push 0
push 0x104f33c8
push 0x104
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x100521ba
push 0x10308828
call fcn.1003e760
add esp, 4
xor al, al
jmp 0x100522bc
push 0x104f33c8
call fcn.1003e8a0
add esp, 4
jmp 0x100522b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10052287
push str.savePeFileToDisk:_Name_clash__trying_to_obtain_new_name...
call fcn.1003cfe0
add esp, 4
call fcn.10038530
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
push edx
push 0x104f33c8
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x10052253
push 0x104
push 0
push 0x104f33c8
call fcn.1024a480
add esp, 0xc
push 0
push 0x104f33c8
push 0x104
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x10052244
push str.savePeFileToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003e760
add esp, 4
xor al, al
jmp 0x100522bc
push 0x104f33c8
call fcn.1003e8a0
add esp, 4
jmp 0x10052285
push str.savePeFileToDisk:_Failed_twice_to_rename_file
call fcn.1003e760
add esp, 4
push 0x104f33c8
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10052281
push 0x104f33c8
push 0x103087ec
call fcn.1003e760
add esp, 8
xor al, al
jmp 0x100522bc
jmp 0x100522b9
push str.savePeFileToDisk:_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 0x100522b5
push 0x104f33c8
push str.savePeFileToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003e760
add esp, 8
xor al, al
jmp 0x100522bc
mov al, byte [ebp - 1]
pop esi
mov esp, ebp
pop ebp
ret 4