Function at 0x10052bd0
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.10052210
movzx edx, ax
cmp edx, dword [ebp - 0x24]
je 0x10052c23
xor al, al
jmp 0x100531cc
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.10052880
movzx ecx, al
test ecx, ecx
je 0x100531c9
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.10056070
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10052c6a
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 0x10052cc0
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x1c], 0
je 0x10052cc0
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.10056070
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10052cb7
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.10051420
movzx ecx, al
test ecx, ecx
je 0x10052cd8
mov dword [ebp - 0x14], 0xf8
jmp 0x10052cdf
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.10056070
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10052d08
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 0x10052d2c
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.10052210
movzx eax, ax
cmp esi, eax
jge 0x10052d87
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.10056070
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x10052d7c
mov byte [ebp - 1], 0
jmp 0x10052d87
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
jmp 0x10052d20
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x48], 0
je 0x10052dcb
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.10056070
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x10052dc2
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 0x10052ddf
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.10052210
movzx ecx, ax
cmp esi, ecx
jge 0x10052fba
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 0x10052e16
jmp 0x10052dd3
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 0x10052e87
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.10053440
movzx edx, al
test edx, edx
jne 0x10052e7e
mov byte [ebp - 1], 0
jmp 0x10052fba
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 0x10052fb5
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.10056070
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x10052f0a
mov byte [ebp - 1], 0
jmp 0x10052fba
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 0x10052fb5
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.10053440
movzx edx, al
test edx, edx
jne 0x10052fac
mov byte [ebp - 1], 0
jmp 0x10052fba
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
jmp 0x10052dd3
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x30], 0
je 0x10053007
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x2c], 0
je 0x10053007
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.10056070
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10052ffe
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.10052900
movzx edx, byte [ebp - 2]
test edx, edx
jne 0x10053034
xor al, al
jmp 0x100531cc
cmp dword [ebp + 8], 0
jne 0x100531c9
push 0
push 0x104f4ee0
push 0x104
push 0x10309868
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005306d
push 0x10309878
call fcn.1003f670
add esp, 4
xor al, al
jmp 0x100531cc
call fcn.10039430
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
push 0x104f4ee0
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x100530dc
push 0x104
push 0
push 0x104f4ee0
call fcn.1024b810
add esp, 0xc
push 0
push 0x104f4ee0
push 0x104
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x100530ca
push 0x103098f8
call fcn.1003f670
add esp, 4
xor al, al
jmp 0x100531cc
push 0x104f4ee0
call fcn.1003f7b0
add esp, 4
jmp 0x100531c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10053197
push str.savePeFileToDisk:_Name_clash__trying_to_obtain_new_name...
call fcn.1003def0
add esp, 4
call fcn.10039430
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
push edx
push 0x104f4ee0
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x10053163
push 0x104
push 0
push 0x104f4ee0
call fcn.1024b810
add esp, 0xc
push 0
push 0x104f4ee0
push 0x104
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x10053154
push str.savePeFileToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003f670
add esp, 4
xor al, al
jmp 0x100531cc
push 0x104f4ee0
call fcn.1003f7b0
add esp, 4
jmp 0x10053195
push str.savePeFileToDisk:_Failed_twice_to_rename_file
call fcn.1003f670
add esp, 4
push 0x104f4ee0
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10053191
push 0x104f4ee0
push 0x103098bc
call fcn.1003f670
add esp, 8
xor al, al
jmp 0x100531cc
jmp 0x100531c9
push str.savePeFileToDisk:_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 0x100531c5
push 0x104f4ee0
push str.savePeFileToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003f670
add esp, 8
xor al, al
jmp 0x100531cc
mov al, byte [ebp - 1]
pop esi
mov esp, ebp
pop ebp
ret 4