Function at 0x1002e280
Capabilities:
Copy file
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100526fd
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x100e8018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x49c], edx
mov edi, ecx
mov eax, dword fs:[0x2c]
mov esi, dword [0x100ea57c]
mov esi, dword [eax + esi*4]
mov eax, dword [0x100f0128]
cmp eax, dword [esi + 4]
jle 0x1002e33c
push 0x100f0128
call fcn.1003156e
add esp, 4
cmp dword [0x100f0128], 0xffffffff
jne 0x1002e33c
mov dword [ebp - 4], 0
mov ecx, 0x100f012c
push 0x10
push str.ropgadgets32.dll
mov dword [0x100f012c], 0
mov dword [0x100f013c], 0
mov dword [0x100f0140], 7
call fcn.1000ff20
push 0x10052880
call fcn.10031b4b
push 0x100f0128
mov dword [ebp - 4], 0xffffffff
call fcn.10031524
add esp, 8
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100346a0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1002e3f1
push str.ERROR:_getting_current_file_name_n
push dword [0x100ee8a4]
call fcn.1000f610
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x480]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002e39c
mov eax, dword [eax]
push eax
push str.Last_error:__s_n
push dword [0x100ee8a4]
call fcn.1000f610
mov edx, dword [ebp - 0x46c]
add esp, 0xc
cmp edx, 0x10
jb 0x1002e3ea
mov ecx, dword [ebp - 0x480]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002e3e0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb84
push edx
push ecx
call fcn.1003140a
add esp, 8
xor eax, eax
jmp 0x1002eb68
xor eax, eax
mov dword [ebp - 0x468], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 7
lea edx, [ecx + 2]
mov word [ebp - 0x468], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002e421
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x468]
call fcn.1000ff20
mov dword [ebp - 4], 1
lea edx, [ebp - 0x468]
mov ebx, dword [ebp - 0x454]
cmp ebx, 8
mov esi, dword [ebp - 0x458]
cmovae edx, dword [ebp - 0x468]
test esi, esi
je 0x1002e493
lea eax, [esi - 1]
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
cmp word [edx + ecx*2], 0x5c
lea eax, [edx + ecx*2]
je 0x1002e48d
nop
cmp eax, edx
je 0x1002e493
sub eax, 2
cmp word [eax], 0x5c
jne 0x1002e480
sub eax, edx
sar eax, 1
jmp 0x1002e496
or eax, 0xffffffff
lea ecx, [eax + 1]
cmp ecx, esi
ja 0x1002e4bb
cmp ebx, 8
mov dword [ebp - 0x458], ecx
lea eax, [ebp - 0x468]
cmovae eax, dword [ebp - 0x468]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x1002e4cb
sub ecx, esi
push 0
push ecx
lea ecx, [ebp - 0x468]
call fcn.1002f920
mov edx, dword [ebp - 0x458]
mov esi, SysReAllocString
mov ebx, dword [0x100f013c]
mov eax, esi
sub eax, edx
cmp eax, ebx
jb 0x1002eb89
cmp dword [ebp - 0x454], 8
lea ecx, [ebp - 0x468]
push ebx
cmovae ecx, dword [ebp - 0x468]
mov eax, 0x100f012c
cmp dword [0x100f0140], 8
cmovae eax, dword [0x100f012c]
push eax
push edx
push ecx
push ecx
push dword [ebp - 0x49c]
lea ecx, [ebp - 0x450]
call fcn.1002fe50
mov byte [ebp - 4], 2
lea eax, [ebp - 0x450]
cmp dword [ebp - 0x43c], 8
cmovae eax, dword [ebp - 0x450]
push eax
push str.Rop_gadget_dll_path:__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
lea eax, [ebp - 0x450]
cmp dword [ebp - 0x43c], 8
cmovae eax, dword [ebp - 0x450]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x1002ea36
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x1002e627
push str.ERROR:_Could_not_retrieve_temp_path_n
push dword [0x100ee8a4]
call fcn.1000f610
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x480]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002e5d6
mov eax, dword [eax]
push eax
push str.Last_error:__s_n
push dword [0x100ee8a4]
call fcn.1000f610
mov edx, dword [ebp - 0x46c]
add esp, 0xc
cmp edx, 0x10
jb 0x1002eacb
mov ecx, dword [ebp - 0x480]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002eac1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb8e
jmp 0x1002eac1
xor eax, eax
mov dword [ebp - 0x480], 0
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x470], 0
mov dword [ebp - 0x46c], 7
lea edx, [ecx + 2]
mov word [ebp - 0x480], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002e657
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x480]
call fcn.1000ff20
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x470]
sub esi, edx
mov ecx, dword [edi + 0x10]
cmp esi, ecx
jb 0x1002eb93
cmp dword [ebp - 0x46c], 8
lea eax, [ebp - 0x480]
cmovae eax, dword [ebp - 0x480]
cmp dword [edi + 0x14], 8
jb 0x1002e6ac
mov edi, dword [edi]
push ecx
push edi
push edx
push eax
push ecx
push dword [ebp - 0x49c]
lea ecx, [ebp - 0x438]
call fcn.1002fe50
mov byte [ebp - 4], 4
lea eax, [ebp - 0x438]
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x50
jne 0x1002e830
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
cmovae eax, dword [ebp - 0x438]
push eax
push str.Target_file__s_exists__deleting_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
lea eax, [ebp - 0x438]
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
lea eax, [ebp - 0x438]
jne 0x1002e7cd
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push eax
push str.ERROR:_setting_file_attribues_for__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x498]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002e77c
mov eax, dword [eax]
push eax
push str.Last_error:__s_n
push dword [0x100ee8a4]
call fcn.1000f610
mov edx, dword [ebp - 0x484]
add esp, 0xc
cmp edx, 0x10
jb 0x1002e96a
mov ecx, dword [ebp - 0x498]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002e960
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb98
jmp 0x1002e960
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1002e830
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
cmovae eax, dword [ebp - 0x438]
push eax
push str.ERROR:_deleting_file__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x498]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002e77c
jmp 0x1002e77a
cmp dword [ebp - 0x424], 8
lea ecx, [ebp - 0x438]
push 1
cmovae ecx, dword [ebp - 0x438]
lea eax, [ebp - 0x450]
cmp dword [ebp - 0x43c], 8
push ecx
cmovae eax, dword [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1002e8c5
cmp dword [ebp - 0x424], 8
lea ecx, [ebp - 0x438]
lea eax, [ebp - 0x450]
cmovae ecx, dword [ebp - 0x438]
cmp dword [ebp - 0x43c], 8
push ecx
cmovae eax, dword [ebp - 0x450]
push eax
push str.ERROR:_Could_not_copy_rop_gadget_FROM:__s_TO:__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x498]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002e77c
jmp 0x1002e77a
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
cmovae eax, dword [ebp - 0x438]
push eax
push str.Successfully_copied_rop_gadget_to:__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
lea eax, [ebp - 0x438]
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push dword [ebp - 0x49c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
lea eax, [ebp - 0x438]
test esi, esi
jne 0x1002e96e
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push eax
push str.ERROR:_loading_library__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x498]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002e77c
jmp 0x1002e77a
push edx
push ecx
call fcn.1003140a
add esp, 8
xor esi, esi
jmp 0x1002e990
cmp dword [ebp - 0x424], 8
cmovae eax, dword [ebp - 0x438]
push eax
push str.Loaded_library__s_n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
mov edx, dword [ebp - 0x424]
cmp edx, 8
jb 0x1002e9d0
mov ecx, dword [ebp - 0x438]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1002e9c6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb98
push edx
push ecx
call fcn.1003140a
add esp, 8
mov edx, dword [ebp - 0x46c]
xor eax, eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
cmp edx, 8
jb 0x1002eacd
mov ecx, dword [ebp - 0x480]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1002ea27
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb98
push edx
push ecx
call fcn.1003140a
add esp, 8
jmp 0x1002eacd
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp dword [ebp - 0x43c], 8
lea eax, [ebp - 0x450]
cmovae eax, dword [ebp - 0x450]
push eax
push str.ERROR:_The_rop_gadget_dll__s_is_not_accessible__n
push dword [0x100ee8a4]
call fcn.100105b0
add esp, 0xc
call esi
mov edx, eax
lea ecx, [ebp - 0x498]
call fcn.1002dfc0
cmp dword [eax + 0x14], 0x10
jb 0x1002ea7d
mov eax, dword [eax]
push eax
push str.Last_error:__s_n
push dword [0x100ee8a4]
call fcn.1000f610
mov edx, dword [ebp - 0x484]
add esp, 0xc
cmp edx, 0x10
jb 0x1002eacb
mov ecx, dword [ebp - 0x498]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002eac1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb98
push edx
push ecx
call fcn.1003140a
add esp, 8
xor esi, esi
mov edx, dword [ebp - 0x43c]
cmp edx, 8
jb 0x1002eb0d
mov ecx, dword [ebp - 0x450]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1002eb03
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb98
push edx
push ecx
call fcn.1003140a
add esp, 8
mov edx, dword [ebp - 0x454]
xor eax, eax
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x43c], 7
mov word [ebp - 0x450], ax
cmp edx, 8
jb 0x1002eb66
mov ecx, dword [ebp - 0x468]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1002eb5c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002eb98
push edx
push ecx
call fcn.1003140a
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100313c7
mov esp, ebp
pop ebp
ret
call fcn.100397bd
call fcn.10001a90
call fcn.100397bd
call fcn.10001a90
call fcn.100397bd
int3