Function at 0x1002c060
Capabilities:
Delete file
Get common file path
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1013a929
mov eax, dword fs:[0]
push eax
mov eax, 0x12b8
call fcn.1009e2b0
mov eax, dword [0x1019bc84]
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 esi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x12c4], eax
mov dword [ebp - 0x12bc], 0
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x1002c6ab
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x12b8], eax
lea eax, [ebp - 0x12b8]
mov dword [ebp - 4], 0
push eax
call fcn.1002bc60
mov edi, dword [ebp - 0x12b8]
add esp, 4
test eax, eax
je 0x1002c66a
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call ebx
push edi
call ebx
push 0
push 0x80
push 1
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0x12ac], ecx
cmp ecx, 0xffffffff
je 0x1002c66a
mov ecx, dword [esi + 8]
mov esi, dword [esi + 4]
test esi, esi
je 0x1002c1f6
test ecx, ecx
jle 0x1002c1f6
mov eax, ecx
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
mov dword [ebp - 0x12a4], eax
and ecx, 0x80000fff
jns 0x1002c158
dec ecx
or ecx, 0xfffff000
inc ecx
xor ebx, ebx
mov dword [ebp - 0x12a8], ecx
mov dword [ebp - 0x12b0], 0
test eax, eax
jle 0x1002c1bf
nop
push 0x1000
lea eax, [ebp - 0x1218]
push esi
push eax
call fcn.100e37c0
add esp, 0xc
lea eax, [ebp - 0x12b0]
push 0
push eax
push 0x1000
lea eax, [ebp - 0x1218]
push eax
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002c1f6
inc ebx
add esi, 0x1000
cmp ebx, dword [ebp - 0x12a4]
jl 0x1002c170
mov ecx, dword [ebp - 0x12a8]
test ecx, ecx
jle 0x1002c1f6
push ecx
lea eax, [ebp - 0x1218]
push esi
push eax
call fcn.100e37c0
add esp, 0xc
lea eax, [ebp - 0x12b0]
push 0
push eax
push dword [ebp - 0x12a8]
lea eax, [ebp - 0x1218]
push eax
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x1002c6b5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x12ac], eax
lea eax, [ebp - 0x12ac]
mov byte [ebp - 4], 1
push eax
call fcn.1002bc60
mov esi, dword [ebp - 0x12ac]
add esp, 4
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
cmp dword [ebp + 0xc], 0
je 0x1002c25f
push 0
push esi
push edi
call fcn.100a6e90
test eax, eax
jns 0x1002c628
xor esi, esi
jmp 0x1002c646
test edi, edi
je 0x1002c27e
test esi, esi
je 0x1002c27e
push esi
push 0x1002bb10
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
jne 0x1002c628
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100e3030
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x129d]
call fcn.1000a950
push 0x400
lea eax, [ebp - 0x618]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.100e3030
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x1002c6bf
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x12a4], eax
mov byte [ebp - 4], 3
test esi, esi
je 0x1002c331
test esi, 0xffff0000
jne 0x1002c319
movzx eax, si
lea ecx, [ebp - 0x12a4]
push eax
call fcn.1000d400
jmp 0x1002c340
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002c320
sub ecx, edx
sar ecx, 1
jmp 0x1002c333
xor ecx, ecx
push ecx
push esi
lea ecx, [ebp - 0x12a4]
call fcn.1000d5b0
mov eax, dword [ebp - 0x12a4]
mov byte [ebp - 4], 5
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x1002c35c
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x1002c372
call fcn.1000ca70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x1002c6c9
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x12bc], 1
lea esi, [eax + 0x10]
mov eax, dword [ebp - 0x12a4]
mov dword [ebp - 0x12a8], esi
mov eax, dword [eax - 0xc]
mov dword [ebp - 0x12c0], eax
lea ebx, [eax + 1]
test ebx, ebx
js 0x1002c6d3
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x1002c3c7
push ebx
lea ecx, [ebp - 0x12a8]
call fcn.1000af00
mov esi, dword [ebp - 0x12a8]
test esi, esi
jne 0x1002c3dd
call fcn.100ffec9
mov dword [eax], 0x16
call fcn.100ffda3
jmp 0x1002c3e6
mov ax, word [0x10151d64]
mov word [esi], ax
mov eax, dword [ebp - 0x12c0]
push eax
push dword [ebp - 0x12a4]
push eax
lea eax, [esi + 2]
push eax
call fcn.1000c360
add esp, 0x10
cmp ebx, dword [esi - 8]
jg 0x1002c6d3
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
lea ecx, [ebp - 0x12a4]
lea eax, [ebp - 0x12a8]
push eax
call fcn.1001cb00
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1002c440
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x12a4]
lea eax, [ebp - 0x1298]
mov dword [ebp - 0x129c], eax
test esi, esi
jne 0x1002c463
xor ebx, ebx
mov dword [ebp - 0x129c], ebx
jmp 0x1002c54e
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002c470
sub ecx, edx
sar ecx, 1
push 0x80
lea eax, [ecx + 1]
lea ebx, [eax*4]
mov dword [ebp - 0x12a8], eax
lea eax, [ebp - 0x1298]
push eax
lea eax, [ebp - 0x129c]
push ebx
push eax
call fcn.1002b9f0
add esp, 0x10
push 0
push 0
push ebx
push dword [ebp - 0x129c]
push dword [ebp - 0x12a8]
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x1002c540
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002c540
push 0
push 0
push 0
push 0
push dword [ebp - 0x12a8]
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
lea eax, [ebp - 0x1298]
push 0x80
push eax
lea eax, [ebp - 0x129c]
push ebx
push eax
call fcn.1002b9f0
add esp, 0x10
push 0
push 0
push ebx
push dword [ebp - 0x129c]
push dword [ebp - 0x12a8]
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
test ebx, ebx
jne 0x1002c6dd
mov ebx, dword [ebp - 0x129c]
lea ecx, [ebp - 0x618]
mov esi, ebx
mov eax, ecx
mov edx, 0x400
sub esi, eax
nop
lea eax, [edx + 0x7ffffbfe]
test eax, eax
je 0x1002c579
mov al, byte [ecx + esi]
test al, al
je 0x1002c579
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x1002c560
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
lea eax, [ebp - 0x1298]
cmp ebx, eax
je 0x1002c597
push ebx
call fcn.100fff68
add esp, 4
movzx eax, word [0x10154cc4]
lea ecx, [ebp - 0x129d]
mov word [ebp - 0x12b0], ax
movzx eax, byte [0x10154cc6]
mov byte [ebp - 0x12ae], al
movzx eax, word [0x10154cc8]
mov word [ebp - 0x12b4], ax
movzx eax, byte [0x10154cca]
mov byte [ebp - 0x12b2], al
lea eax, [ebp - 0x12b0]
push eax
lea eax, [ebp - 0x12b4]
mov byte [ebp - 0x12ad], 0
push eax
lea eax, [ebp - 0x618]
push eax
call fcn.1000aae0
mov esi, eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x12a4]
call fcn.1000a960
lea ecx, [ebp - 0x129d]
test esi, esi
jne 0x1002c61f
call fcn.1000a9b0
jmp 0x1002c646
mov byte [ebp - 4], 1
call fcn.1000a9b0
mov ecx, dword [ebp - 0x12c4]
lea eax, [ebp - 0x12ac]
push eax
call fcn.1001cb00
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, 1
mov edx, dword [ebp - 0x12ac]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002c66c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1002c66c
xor esi, esi
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1002c68b
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
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.1009de58
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.1000aab0
push 0x80004005
call fcn.1000aab0
push 0x80004005
call fcn.1000aab0
push 0x80004005
call fcn.1000aab0
push 0x80070057
call fcn.1000aab0
push 0x80
lea eax, [ebp - 0x1298]
push eax
push dword [ebp - 0x129c]
call fcn.1002ba70
add esp, 0xc
call fcn.1002baf0
int3