Function at 0x10052170
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.100517b0
movzx edx, ax
cmp edx, dword [ebp - 0x24]
je 0x100521c3
xor al, al
jmp 0x1005276c
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.10051e20
movzx ecx, al
test ecx, ecx
je 0x10052769
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.10055610
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x1005220a
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 0x10052260
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x1c], 0
je 0x10052260
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.10055610
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x10052257
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.100509c0
movzx ecx, al
test ecx, ecx
je 0x10052278
mov dword [ebp - 0x14], 0xf8
jmp 0x1005227f
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.10055610
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x100522a8
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 0x100522cc
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.100517b0
movzx eax, ax
cmp esi, eax
jge 0x10052327
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.10055610
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x1005231c
mov byte [ebp - 1], 0
jmp 0x10052327
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
jmp 0x100522c0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x48], 0
je 0x1005236b
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.10055610
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x10052362
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 0x1005237f
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.100517b0
movzx ecx, ax
cmp esi, ecx
jge 0x1005255a
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 0x100523b6
jmp 0x10052373
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 0x10052427
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.100529e0
movzx edx, al
test edx, edx
jne 0x1005241e
mov byte [ebp - 1], 0
jmp 0x1005255a
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 0x10052555
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.10055610
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x100524aa
mov byte [ebp - 1], 0
jmp 0x1005255a
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 0x10052555
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.100529e0
movzx edx, al
test edx, edx
jne 0x1005254c
mov byte [ebp - 1], 0
jmp 0x1005255a
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
jmp 0x10052373
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x30], 0
je 0x100525a7
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x2c], 0
je 0x100525a7
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.10055610
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x1005259e
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.10051ea0
movzx edx, byte [ebp - 2]
test edx, edx
jne 0x100525d4
xor al, al
jmp 0x1005276c
cmp dword [ebp + 8], 0
jne 0x10052769
push 0
push 0x104f3570
push 0x104
push 0x103087b8
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005260d
push 0x103087c8
call fcn.1003ebe0
add esp, 4
xor al, al
jmp 0x1005276c
call fcn.100389b0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
push 0x104f3570
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x1005267c
push 0x104
push 0
push 0x104f3570
call fcn.1024a9c0
add esp, 0xc
push 0
push 0x104f3570
push 0x104
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x1005266a
push 0x10308848
call fcn.1003ebe0
add esp, 4
xor al, al
jmp 0x1005276c
push 0x104f3570
call fcn.1003ed30
add esp, 4
jmp 0x10052769
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10052737
push str.savePeFileToDisk:_Name_clash__trying_to_obtain_new_name...
call fcn.1003d460
add esp, 4
call fcn.100389b0
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
push edx
push 0x104f3570
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x10052703
push 0x104
push 0
push 0x104f3570
call fcn.1024a9c0
add esp, 0xc
push 0
push 0x104f3570
push 0x104
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x100526f4
push str.savePeFileToDisk:_There_was_a_problem_obtaining_the_full_file_path
call fcn.1003ebe0
add esp, 4
xor al, al
jmp 0x1005276c
push 0x104f3570
call fcn.1003ed30
add esp, 4
jmp 0x10052735
push str.savePeFileToDisk:_Failed_twice_to_rename_file
call fcn.1003ebe0
add esp, 4
push 0x104f3570
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10052731
push 0x104f3570
push 0x1030880c
call fcn.1003ebe0
add esp, 8
xor al, al
jmp 0x1005276c
jmp 0x10052769
push str.savePeFileToDisk:_There_was_a_problem_renaming_the_file
call fcn.1003ebe0
add esp, 4
push 0x104f3570
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10052765
push 0x104f3570
push str.savePeFileToDisk:_There_was_a_problem_deleting_the_file:__s
call fcn.1003ebe0
add esp, 8
xor al, al
jmp 0x1005276c
mov al, byte [ebp - 1]
pop esi
mov esp, ebp
pop ebp
ret 4