Function at 0x401020
Capabilities:
Delete directory
Write file on windows

Disassembly:
mov eax, 0x19a58
call fcn.00410410
mov eax, dword [0x418174]
xor eax, esp
mov dword [esp + 0x19a54], eax
mov eax, dword [esp + 0x19a5c]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [edi]
xor ebx, ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
cmp ecx, ebx
je 0x401466
cmp dword [ecx], 1
mov eax, dword [eax]
je 0x40106c
mov dword [0x41a450], 0x80000
jmp 0x40107b
mov ecx, dword [ecx + 4]
mov esi, ecx
call fcn.00404f10
mov dword [0x41a450], eax
mov eax, dword [edi]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x30], ecx
mov word [esp + 0x34], dx
mov dword [esp + 0x25c], ebx
cmp eax, ebx
jne 0x4010a5
mov edi, 0x10000
mov dword [0x41a450], edi
jmp 0x401132
cmp dword [eax], 1
je 0x4010b6
mov dword [0x41a450], 0x80000
jmp 0x40112d
mov esi, dword [eax + 4]
mov edi, dword [esi]
or ebp, 0xffffffff
cmp dword [edi + 4], ebp
jg 0x4010ca
mov eax, 0x10000
jmp 0x401128
cmp dword [esi + 4], ebp
je 0x4010d4
call fcn.00404d60
mov eax, dword [esi]
mov dword [esi + 4], ebp
mov ecx, dword [eax + 4]
xor edx, edx
mov dword [esp + 0x30], ecx
mov word [esp + 0x34], dx
mov dword [esp + 0x23c], ebx
mov dword [esp + 0x240], ebx
mov dword [esp + 0x244], ebx
mov dword [esp + 0x248], ebx
mov dword [esp + 0x24c], ebx
mov dword [esp + 0x250], ebx
mov dword [esp + 0x254], ebx
mov dword [esp + 0x258], ebx
mov dword [esp + 0x25c], ebx
xor eax, eax
mov dword [0x41a450], eax
mov edi, 0x10000
mov ebp, ecx
xor esi, esi
cmp ecx, ebx
mov dword [esp + 0x28], ebp
jle 0x40118d
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
xor ecx, ecx
mov dword [esp + 0x30], ebx
mov word [esp + 0x34], cx
mov dword [esp + 0x25c], ebx
cmp eax, ebx
jne 0x401162
mov dword [0x41a450], edi
jmp 0x401188
cmp dword [eax], 1
je 0x401173
mov dword [0x41a450], 0x80000
jmp 0x401188
mov eax, dword [eax + 4]
lea edx, [esp + 0x30]
push edx
push esi
mov ecx, eax
call fcn.00404f80
mov dword [0x41a450], eax
inc esi
cmp esi, ebp
jl 0x40113e
xor ecx, ecx
cmp ebp, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
jg 0x4011b6
mov eax, dword [esp + 0x20]
mov ebx, dword [eax]
test ebx, ebx
jne 0x40146d
mov dword [0x41a450], edi
jmp 0x40152b
xor ecx, ecx
mov esi, dword [esp + 0x20]
mov eax, dword [esi]
xor edx, edx
mov dword [esp + 0x30], ecx
mov word [esp + 0x34], dx
mov dword [esp + 0x25c], ecx
cmp eax, ecx
jne 0x4011da
mov dword [0x41a450], edi
jmp 0x401200
cmp dword [eax], 1
je 0x4011eb
mov dword [0x41a450], 0x80000
jmp 0x401200
mov eax, dword [eax + 4]
lea ecx, [esp + 0x30]
push ecx
push ebx
mov ecx, eax
call fcn.00404f80
mov dword [0x41a450], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
lea edx, [esp + 0x34]
push edx
push ecx
lea edx, [esp + 0x268]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x278]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x401385
mov dword [esp + 0x14], 0
jmp 0x40125d
mov esi, dword [esp + 0x20]
mov edi, 0x10000
mov eax, dword [esi]
test eax, eax
jne 0x40126b
mov dword [0x41a450], edi
jmp 0x40129b
cmp dword [eax], 1
je 0x40127d
mov edi, 0x80000
mov dword [0x41a450], edi
jmp 0x40129b
mov eax, dword [eax + 4]
lea ecx, [esp + 0xa60]
push ecx
push ebx
mov ebx, eax
call fcn.00405540
mov ebx, dword [esp + 0x1c]
mov dword [0x41a450], eax
mov edi, eax
mov esi, 0x19000
test edi, edi
jne 0x4012af
mov esi, dword [esp + 0x25c]
sub esi, dword [esp + 0x14]
push 0
lea edx, [esp + 0x30]
push edx
push esi
lea eax, [esp + 0xa6c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [esp + 0x14], esi
add dword [esp + 0x18], esi
cmp edi, 0x600
je 0x401254
lea eax, [esp + 0x34]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4012e1
sub eax, edx
sar eax, 1
lea ecx, [esp + eax*2 + 0x2c]
push str..exe
push ecx
mov dword [esp + 0x1c], eax
call fcn.00410fc7
add esp, 8
test eax, eax
jne 0x401365
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x64
div ecx
mov dword [esp + 0x18], edx
test edx, edx
jbe 0x401365
mov eax, edx
mov bl, al
add bl, byte [esp + 0x1c]
mov esi, eax
jmp 0x401330
push 2
push 0
push 0
push ebp
mov byte [esp + 0xa70], bl
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [esp + 0x18]
push edx
push 1
lea eax, [esp + 0xa6c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esi, 1
jne 0x401330
mov ebx, dword [esp + 0x1c]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
cmp ebx, dword [esp + 0x28]
mov dword [esp + 0x1c], ebx
mov edi, 0x10000
jl 0x4011b4
jmp 0x40119b
lea ecx, [esp + 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ebx, dword [esi]
test ebx, ebx
jne 0x4013a6
mov dword [0x41a450], edi
xor eax, eax
jmp 0x401530
cmp dword [ebx], 1
je 0x4013bc
mov dword [0x41a450], 0x80000
xor eax, eax
jmp 0x401530
mov esi, dword [ebx + 4]
or ebp, 0xffffffff
cmp dword [esi + 4], ebp
je 0x4013ce
mov edi, dword [esi]
call fcn.00404d60
mov edi, dword [esi]
mov dword [esi + 4], ebp
test edi, edi
je 0x40140a
cmp dword [edi + 0x7c], 0
je 0x4013e2
call fcn.00404d60
mov ebp, dword [edi]
test ebp, ebp
je 0x401401
cmp byte [ebp + 0x10], 0
je 0x4013f8
mov edx, dword [ebp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.00407378
add esp, 4
push edi
call fcn.00407423
add esp, 4
mov dword [esi], 0
mov eax, dword [esi + 0x23c]
mov dword [0x41a450], 0
test eax, eax
je 0x40142d
push eax
call fcn.004076a4
add esp, 4
mov eax, dword [esi + 0x240]
mov dword [esi + 0x23c], 0
test eax, eax
je 0x40144a
push eax
call fcn.004076a4
add esp, 4
push esi
mov dword [esi + 0x240], 0
call fcn.00407378
add esp, 4
push ebx
call fcn.00407378
add esp, 4
xor eax, eax
jmp 0x401530
cmp dword [ebx], 1
je 0x401481
mov dword [0x41a450], 0x80000
jmp 0x40152b
mov esi, dword [ebx + 4]
or ebp, 0xffffffff
cmp dword [esi + 4], ebp
je 0x401493
mov edi, dword [esi]
call fcn.00404d60
mov edi, dword [esi]
mov dword [esi + 4], ebp
test edi, edi
je 0x4014cf
cmp dword [edi + 0x7c], 0
je 0x4014a7
call fcn.00404d60
mov ebp, dword [edi]
test ebp, ebp
je 0x4014c6
cmp byte [ebp + 0x10], 0
je 0x4014bd
mov ecx, dword [ebp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.00407378
add esp, 4
push edi
call fcn.00407423
add esp, 4
mov dword [esi], 0
mov eax, dword [esi + 0x23c]
mov dword [0x41a450], 0
test eax, eax
je 0x4014f2
push eax
call fcn.004076a4
add esp, 4
mov eax, dword [esi + 0x240]
mov dword [esi + 0x23c], 0
test eax, eax
je 0x40150f
push eax
call fcn.004076a4
add esp, 4
push esi
mov dword [esi + 0x240], 0
call fcn.00407378
add esp, 4
push ebx
call fcn.00407378
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x19a64]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407383
add esp, 0x19a58
ret 4