Function at 0x521440
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60c266
mov eax, dword fs:[0]
push eax
sub esp, 0xf14
mov eax, dword [0x6b000c]
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 ebx, ecx
mov dword [ebp - 0xeb4], ebx
mov dword [ebp - 0xecc], 0
cmp dword [0x6b0c54], 4
ja 0x521fb9
mov eax, dword [ebx + 0x91c]
test eax, eax
je 0x521fb9
cmp dword [eax + 4], 0
je 0x521fb9
lea ecx, [ebp - 0xee0]
call fcn.0040c490
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xf20]
mov dword [ebp - 0xeb0], 0
mov dword [ebp - 0xed0], 0
mov dword [ebp - 0xed4], 0
mov dword [ebp - 0xed8], 0
call fcn.00465160
mov byte [ebp - 4], 1
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push dword [ebx + 0x918]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xea8], eax
cmp eax, 0xffffffff
je 0x521eff
mov esi, dword [ebx + 0x91c]
lea eax, [ebp - 0xee0]
push dword [0x6b0c54]
push str.bst00000
mov esi, dword [esi]
push str._s_u
push eax
mov dword [ebp - 0xedc], esi
mov edi, dword [esi]
mov dword [ebp - 0xee8], edi
call fcn.0040d300
add esp, 0x10
lea eax, [ebp - 0xeb0]
push 0
push eax
push 9
push dword [ebp - 0xee0]
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x6b0c54], 4
jne 0x521877
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00588800
mov eax, dword [ebx + 0x910]
add esp, 0xc
push dword [eax + 0xadc]
lea eax, [ebp - 0x218]
push str..PhysicalDrive_d
push 0x12
push eax
call fcn.0046d0c0
mov esi, dword [ebp - 0xea8]
lea eax, [ebp - 0xeb0]
add esp, 0x10
push 0
push eax
push 0x208
lea eax, [ebp - 0x218]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x910]
mov ecx, dword [eax + 0xb3c]
test ecx, ecx
jne 0x521612
push esi
mov dword [ebp - 0xec8], 0xffffffff
mov dword [ebp - 0xec4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x918]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x521f01
mov eax, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x1c]
mov dword [ebp - 0xec8], eax
mov dword [ebp - 0xec4], ecx
cmp eax, 0xffffffff
jne 0x521647
cmp ecx, eax
jne 0x521647
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x918]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x521f01
push 0
lea eax, [ebp - 0xeb0]
push eax
push 8
lea eax, [ebp - 0xec8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [ebx + 0x910]
cmp dword [ebx + 0xae0], 0
je 0x521857
call fcn.0040bf10
mov ecx, eax
test ecx, ecx
je 0x521fd7
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0xee4], esi
mov byte [ebp - 4], 4
mov eax, dword [ebx + 0xadc]
mov dword [ebp - 0x658], eax
mov eax, dword [ebx + 0xb20]
mov dword [ebp - 0x654], eax
mov eax, dword [ebx + 0xae0]
mov eax, dword [eax + 8]
mov dword [ebp - 0x650], eax
mov ecx, dword [ebx + 0xae0]
mov eax, dword [ecx + 0x28]
mov dword [ebp - 0x63c], eax
mov eax, dword [ecx + 0x2c]
mov dword [ebp - 0x638], eax
mov ecx, dword [ebx + 0xae0]
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0x644], eax
mov eax, dword [ecx + 0x24]
mov dword [ebp - 0x640], eax
mov eax, dword [ebx + 0xae0]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x648], eax
mov eax, dword [ebx + 0xae0]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x64c], eax
mov ecx, dword [ebx + 0xae0]
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x634], eax
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x630], eax
mov eax, dword [ebx + 0xae0]
add eax, 0x38
mov dword [ebp - 0xeac], eax
mov edx, dword [eax]
mov eax, dword [edx - 0xc]
mov dword [ebp - 0xea4], eax
test eax, eax
js 0x521fe1
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, dword [edx - 0xc]
or eax, ecx
jge 0x52176e
push dword [ebp - 0xea4]
mov ecx, dword [ebp - 0xeac]
call fcn.0040cf60
mov eax, dword [ebp - 0xeac]
mov edx, dword [eax]
push edx
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ecx
mov ecx, dword [ebx + 0xae0]
add ecx, 0x38
call fcn.00490980
mov eax, dword [ebx + 0xae0]
add eax, 0x3c
mov dword [ebp - 0xeac], eax
mov edx, dword [eax]
mov eax, dword [edx - 0xc]
mov dword [ebp - 0xea4], eax
test eax, eax
js 0x521feb
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, dword [edx - 0xc]
or eax, ecx
jge 0x5217d8
push dword [ebp - 0xea4]
mov ecx, dword [ebp - 0xeac]
call fcn.0040cf60
mov eax, dword [ebp - 0xeac]
mov edx, dword [eax]
push edx
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ecx
mov ecx, dword [ebx + 0xae0]
add ecx, 0x3c
call fcn.00490980
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x521811
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0xeb4]
mov esi, dword [ebp - 0xedc]
push 0x52d0
call fcn.005a59ed
add esp, 4
mov dword [ebp - 0xeac], eax
test eax, eax
jne 0x5219db
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x918]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x521f01
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0xeb4]
push dword [esi + 0x918]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x521f01
mov eax, dword [ebx + 0x910]
mov ecx, str.HFS_Plus
mov dword [ebp - 0xea4], eax
mov eax, dword [eax + 0xa34]
mov edx, dword [eax + 8]
mov eax, edx
mov bx, word [eax]
cmp bx, word [ecx]
jne 0x5218b9
test bx, bx
je 0x5218b5
mov bx, word [eax + 2]
cmp bx, word [ecx + 2]
jne 0x5218b9
add eax, 4
add ecx, 4
test bx, bx
jne 0x521893
xor eax, eax
jmp 0x5218be
sbb eax, eax
or eax, 1
test eax, eax
je 0x521f65
mov eax, 0x657848
nop dword [eax + eax]
mov cx, word [edx]
cmp cx, word [eax]
jne 0x5218f6
test cx, cx
je 0x5218f2
mov cx, word [edx + 2]
cmp cx, word [eax + 2]
jne 0x5218f6
add edx, 4
add eax, 4
test cx, cx
jne 0x5218d0
xor eax, eax
jmp 0x5218fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x521f65
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00588800
mov ecx, dword [ebp - 0xea4]
add esp, 8
mov ecx, dword [ecx + 0xa34]
call fcn.004909c0
mov ebx, dword [ebp - 0xeb4]
cmp ax, 0x7b
jne 0x52194d
mov eax, dword [ebx + 0x910]
mov eax, dword [eax + 0xa34]
push dword [eax]
push str._Volume_s
push 0x30
jmp 0x52196a
push ecx
mov ecx, dword [ebx + 0x910]
mov ecx, dword [ecx + 0xa34]
call fcn.004909c0
movzx eax, ax
push eax
push str.._c:
push 6
lea eax, [ebp - 0x218]
push eax
call fcn.0046d0c0
add esp, 0x10
lea eax, [ebp - 0xeb0]
push 0
push eax
push 0x208
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x910]
push 0
mov ecx, dword [eax + 0xa34]
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0xec8], eax
mov eax, dword [ecx + 0x24]
mov dword [ebp - 0xec4], eax
lea eax, [ebp - 0xeb0]
push eax
push 8
lea eax, [ebp - 0xec8]
push eax
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x52181d
mov eax, dword [ebx + 0x91c]
push 0
mov eax, dword [eax + 4]
mov dword [ebp - 0xed8], eax
lea eax, [ebp - 0xeb0]
push eax
push 4
lea eax, [ebp - 0xed8]
push eax
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, esi
je 0x521ed0
cmp dword [ebx + 0x908], 0
jne 0x521ed0
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x521eca
call fcn.0040bf10
test eax, eax
je 0x521fd7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0xeb8], esi
mov byte [ebp - 4], 0xb
mov edx, dword [ebx]
mov eax, dword [edx - 0xc]
mov dword [ebp - 0xea4], eax
test eax, eax
js 0x521fe1
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, dword [edx - 0xc]
or eax, ecx
jge 0x521a7d
push dword [ebp - 0xea4]
mov ecx, ebx
call fcn.0040cf60
mov edx, dword [ebx]
push edx
lea eax, [ebp - 0xea0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebx]
test eax, eax
jne 0x521a95
xor ecx, ecx
jmp 0x521aab
push dword [eax - 8]
push eax
call fcn.00593596
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x521fe1
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x521fe1
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx]
mov word [eax + ecx*2], dx
mov eax, dword [ebx + 4]
mov dword [ebp - 0xebc], eax
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0xea4], ecx
test ecx, ecx
js 0x521fe1
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, dword [ebp - 0xea4]
or eax, ecx
jge 0x521b03
push dword [ebp - 0xea4]
lea ecx, [ebx + 4]
call fcn.0040cf60
mov eax, dword [ebx + 4]
jmp 0x521b09
mov eax, dword [ebp - 0xebc]
push eax
lea eax, [ebp - 0xa90]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebx + 4]
test eax, eax
jne 0x521b22
xor ecx, ecx
jmp 0x521b38
push dword [eax - 8]
push eax
call fcn.00593596
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x521fe1
mov eax, dword [ebx + 4]
cmp ecx, dword [eax - 8]
jg 0x521fe1
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx + 4]
mov word [eax + ecx*2], dx
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0xebc], eax
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0xea4], ecx
test ecx, ecx
js 0x521fe1
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, dword [ebp - 0xea4]
or eax, ecx
jge 0x521b92
push dword [ebp - 0xea4]
lea ecx, [ebx + 0xc]
call fcn.0040cf60
mov eax, dword [ebx + 0xc]
jmp 0x521b98
mov eax, dword [ebp - 0xebc]
push eax
lea eax, [ebp - 0x888]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x521bb1
xor ecx, ecx
jmp 0x521bc7
push dword [eax - 8]
push eax
call fcn.00593596
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x521fe1
mov eax, dword [ebx + 0xc]
cmp ecx, dword [eax - 8]
jg 0x521fe1
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx + 0xc]
mov word [eax + ecx*2], dx
mov byte [ebp - 4], 0xc
mov ecx, dword [ebx + 0x44]
sub ecx, 0x10
call fcn.0040c950
add eax, 0x10
mov dword [ebp - 0xee4], eax
mov byte [ebp - 4], 0xc
lea edx, [eax - 0x10]
or dword [ebp - 0xecc], 1
lea ecx, [esi - 0x10]
mov dword [ebp - 0xea4], edx
mov dword [ebp - 0xebc], ecx
cmp edx, ecx
je 0x521c80
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x521c65
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x521c5f
mov ecx, edx
call fcn.0040c950
mov dword [ebp - 0xec4], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x521c54
mov esi, dword [ebp - 0xebc]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0xec4]
lea esi, [eax + 0x10]
mov dword [ebp - 0xeb8], esi
jmp 0x521c7a
mov eax, dword [ebp - 0xee4]
push dword [eax - 0xc]
lea ecx, [ebp - 0xeb8]
push eax
call fcn.0040c9d0
mov esi, dword [ebp - 0xeb8]
mov edx, dword [ebp - 0xea4]
and dword [ebp - 0xecc], 0xfffffffe
mov byte [ebp - 4], 0xb
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x521ca0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esi - 0xc]
test edx, edx
js 0x521fe1
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x521cce
push edx
lea ecx, [ebp - 0xeb8]
call fcn.0040cf60
mov esi, dword [ebp - 0xeb8]
push esi
lea eax, [ebp - 0xc98]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [esi - 8]
push esi
call fcn.00593596
add esp, 8
test eax, eax
js 0x521fe1
cmp eax, dword [esi - 8]
jg 0x521fe1
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x680], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x67c], eax
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x678], eax
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x674], eax
mov eax, dword [ebx + 0x30]
mov dword [ebp - 0x668], eax
mov eax, dword [ebx + 0x34]
mov dword [ebp - 0x664], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x660], eax
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x65c], eax
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x670], eax
mov eax, dword [ebx + 0x2c]
mov dword [ebp - 0x66c], eax
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x521d78
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0xea0]
mov word [ebp - 0xf08], 0x101
mov dword [ebp - 0xf04], eax
lea ecx, [ebp - 0xf20]
mov eax, dword [ebp - 0xeac]
mov dword [ebp - 0xef4], 0x848
mov dword [ebp - 0xef0], 0
mov dword [ebp - 0xf00], eax
mov dword [ebp - 0xeec], 0
call fcn.00465510
mov eax, dword [ebp - 0xeec]
push eax
mov dword [ebp - 0xed0], eax
call fcn.005a59ed
add esp, 4
mov esi, eax
lea eax, [ebp - 0xeb0]
mov dword [ebp - 0xea4], esi
push 0
push eax
push 4
lea eax, [ebp - 0xed0]
push eax
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0xed0]
xor ebx, ebx
test eax, eax
je 0x521e6d
mov eax, dword [ebp - 0xeac]
sub eax, esi
mov dword [ebp - 0xec4], eax
mov edi, eax
nop dword [eax]
mov ecx, 0x6b88a0
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x521e30
mov eax, dword [ebp - 0xed4]
sub ecx, edx
sar ecx, 1
xor edx, edx
div ecx
mov cl, byte [edi + esi]
inc ebx
xor cl, byte [edx*2 + 0x6b88a0]
mov byte [esi], cl
inc esi
mov eax, dword [ebp - 0xed0]
cmp ebx, eax
jb 0x521e20
mov edi, dword [ebp - 0xee8]
mov esi, dword [ebp - 0xea4]
push 0
lea ecx, [ebp - 0xeb0]
push ecx
push eax
push esi
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.005a51fb
mov eax, dword [ebp - 0xed4]
add esp, 4
mov edi, dword [edi]
inc eax
mov ebx, dword [ebp - 0xeb4]
mov ecx, ebx
mov dword [ebp - 0xed4], eax
push dword [ebp - 0xed8]
mov dword [ebp - 0xee8], edi
push eax
push 0x40d
call dword [sym.imp.ycomuiu.dll_public:_long_int___thiscall_DuiLib::CWindowWnd::PostMessageW_unsigned_int__unsigned_int__long_int_]
cmp edi, dword [ebp - 0xedc]
jne 0x521a10
jmp 0x521ed0
mov ebx, dword [ebp - 0xeb4]
push dword [ebp - 0xeac]
call fcn.005a51fb
add esp, 4
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx + 0x908], 1
jne 0x521eff
push dword [ebx + 0x918]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov bl, 1
mov byte [ebp - 4], 0
push 1
push dword [ebp - 0xf20]
call fcn.005603ff
push 4
push dword [ebp - 0xf14]
call fcn.005603ff
push 4
push dword [ebp - 0xf10]
call fcn.005603ff
push 4
push dword [ebp - 0xf0c]
call fcn.005603ff
add esp, 0x20
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov eax, dword [ebp - 0xee0]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x521f61
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
jmp 0x521fbb
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xee4], esp
push 0x6b0cb0
call fcn.00420d90
mov byte [ebp - 4], 7
push 0
mov byte [ebp - 4], 1
mov edx, 0x40
mov esi, dword [ebp - 0xeb4]
mov ecx, dword [esi + 4]
call fcn.004e0d20
add esp, 0x1c
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x918]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x521f01
xor al, al
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.0055f9be
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040b250
push 0x80070057
call fcn.0040b250
push 0x80070057
call fcn.0040b250
int3