Function at 0x409040
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438bb0
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x450068]
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 - 0x4c], edx
mov eax, ecx
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x48], ecx
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], cx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], cx
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ebx, ebx
mov ecx, 2
lea edi, [eax + 0x14]
mov eax, edi
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.0041aed7
mov esi, eax
add esp, 4
test esi, esi
je 0x4090e0
push ebx
push 0
push esi
call fcn.0041d060
add esp, 0xc
xor eax, eax
mov word [esi], ax
jmp 0x4090e2
xor esi, esi
mov ebx, dword [ebp - 0x44]
push ebx
push str._s_utf8.txt
push edi
push esi
call fcn.00413080
mov ecx, esi
add esp, 0x10
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409100
sub ecx, edx
or edx, 0xffffffff
sar ecx, 1
lea eax, [ecx - 1]
test eax, eax
js 0x409130
nop dword [eax]
cmp word [esi + eax*2], 0x2e
je 0x40912e
sub eax, 1
jns 0x409120
jmp 0x409130
mov edx, eax
xor eax, eax
test ecx, ecx
je 0x409154
lea edi, [eax + 0x5f]
nop dword [eax]
cmp word [esi + eax*2], 0x2e
jne 0x40914f
cmp eax, edx
je 0x40914f
mov word [esi + eax*2], di
inc eax
cmp eax, ecx
jb 0x409140
mov edx, esi
mov ecx, ebx
call fcn.00410600
mov edi, eax
test edi, edi
jne 0x409176
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
lea edx, [ebp - 0x40]
call fcn.004095d0
add esp, 4
jmp 0x409194
push esi
call fcn.0041aafc
cmp edi, 1
jne 0x4091f2
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
lea edx, [ebp - 0x40]
xor esi, esi
call fcn.004095d0
add esp, 8
cmp dword [ebp - 0x14], 8
lea edx, [ebp - 0x28]
push dword [ebp - 0x48]
cmovae edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
cmovae ecx, dword [ebp - 0x40]
push ecx
push dword [ebp - 0x4c]
call fcn.00409300
add esp, 0xc
mov edi, eax
test esi, esi
je 0x409252
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x409252
push esi
push str.File
push str._s:__s
push 0x447fd4
call fcn.004116a0
push esi
call fcn.0041aafc
add esp, 0x14
jmp 0x409252
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
add esp, 4
push 0xfffffffffffffff4
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp eax, 0xffffffff
je 0x40920f
push 0xc
push eax
call esi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call ebx
cmp eax, 0xffffffff
je 0x409235
push 7
push eax
call esi
push str.File_encoding_not_supported__
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 0xc
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x409288
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40927e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4092f0
push edx
push ecx
call fcn.0041aec9
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x4092d2
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4092c8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4092f5
push edx
push ecx
call fcn.0041aec9
add esp, 8
mov eax, edi
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.0041aaeb
mov esp, ebp
pop ebp
ret
call fcn.00422e9e
call fcn.00422e9e
int3