Function at 0x40b850
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x234
mov eax, dword [0x64a040]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov bl, 1
cmp dword [0x65076c], 0
jne 0x40ba5f
mov esi, dword [0x650770]
test esi, esi
jne 0x40b9c0
push 0xc
call fcn.0057dc30
add esp, 4
mov edi, eax
mov esi, eax
lea ebx, [ebp - 0x218]
push 0x208
push 0xff
push ebx
call fcn.00582870
add esp, 0xc
push 0x104
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
dec eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
push ebx
call fcn.0057f442
add esp, 4
cmp eax, 0x7ffffff8
jae 0x40ba96
mov edx, eax
cmp eax, 4
jbe 0x40ba76
mov ebx, edx
or ebx, 3
inc ebx
mov dword [ebp - 0x240], edx
js 0x40ba91
lea eax, [ebx + ebx]
push eax
call fcn.0057dc30
add esp, 4
mov dword [esi], eax
or ebx, 0x80000000
mov dword [esi + 8], ebx
mov edx, dword [ebp - 0x240]
mov dword [esi + 4], edx
lea ebx, [ebp - 0x218]
lea ecx, [eax + edx*2]
mov dword [ebp - 0x240], ecx
cmp ecx, ebx
seta cl
cmp eax, ebx
ja 0x40b934
test cl, cl
jne 0x40babd
test edx, edx
je 0x40b945
add edx, edx
push edx
push ebx
push eax
call fcn.005822f0
add esp, 0xc
mov eax, dword [ebp - 0x240]
mov word [eax], 0
movsx ecx, byte [esi + 0xb]
test ecx, ecx
mov ebx, dword [esi + 4]
mov edx, ecx
cmovs edx, ebx
mov eax, dword [esi]
mov dword [ebp - 0x240], eax
cmovs edi, eax
test edx, edx
je 0x40b9aa
add edx, edx
test edx, edx
je 0x40b9aa
lea eax, [edx - 2]
cmp word [edi + edx - 2], 0x5c
mov edx, eax
jne 0x40b96f
cmp eax, 0xfffffffe
je 0x40b9aa
sar eax, 1
lea edx, [eax + 1]
test cl, cl
jns 0x40ba80
cmp ebx, eax
jbe 0x40ba9d
mov dword [esi + 4], edx
mov ecx, dword [ebp - 0x240]
mov word [ecx + eax*2 + 2], 0
mov ecx, esi
push 9
push str.debug.log
call fcn.0054e9f0
mov dword [0x650770], esi
mov bl, 1
test byte [0x64c0b4], 1
je 0x40ba5f
xorps xmm0, xmm0
movups xmmword [ebp - 0x22c], xmm0
movups xmmword [ebp - 0x23c], xmm0
mov dword [ebp - 0x21c], 0
cmp byte [esi + 0xb], 0
jns 0x40b9f0
mov esi, dword [esi]
lea eax, [ebp - 0x23c]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x40ba1d
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], 0x40000001
sbb eax, 0
jae 0x40baa4
mov eax, dword [0x650770]
cmp byte [eax + 0xb], 0
jns 0x40ba2a
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x635b60]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x65076c], eax
mov bl, 1
inc eax
cmp eax, 1
jbe 0x40bacc
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005810d5
mov eax, ebx
add esp, 0x234
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [esi + 0xb], dl
mov eax, esi
jmp 0x40b91a
cmp eax, ecx
jae 0x40ba9d
and dl, 0x7f
mov byte [esi + 0xb], dl
mov ecx, esi
jmp 0x40b9a3
call fcn.005b6d80
mov ecx, esi
call fcn.005ab850
mov ecx, esi
call fcn.005b7070
mov eax, dword [0x650770]
cmp byte [eax + 0xb], 0
jns 0x40bab1
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40ba1d
push str....._third_partylibc_srcinclude__stringchar_traits.h:223:_assertion__std::__is_pointer_in_range___s1____s1____n____s2__failed:_char_traits::copy:_source_and_destination_ranges_overlap_n
push 0x62a183
call fcn.005aacb0
lea esi, [ebp - 0x216]
push 0x206
push 0xff
push esi
call fcn.00582870
add esp, 0xc
mov word [esi - 2], 0
lea esi, [ebp - 0x218]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add eax, 0xfffffefb
cmp eax, 0xfffffefc
jae 0x40bb10
xor ebx, ebx
jmp 0x40ba5f
mov ecx, dword [0x650770]
push esi
call fcn.00422c20
mov ecx, dword [0x650770]
call fcn.005d4180
cmp word [eax], 0x5c
je 0x40bb3f
mov ecx, dword [0x650770]
push 1
push 0x62ae68
call fcn.0054e9f0
mov ecx, dword [0x650770]
push 9
push str.debug.log
call fcn.0054e9f0
mov eax, dword [0x650770]
cmp byte [eax + 0xb], 0
jns 0x40bb5e
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x635b60]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x65076c], eax
inc eax
cmp eax, 1
ja 0x40bba0
mov dword [0x65076c], 0
jmp 0x40bb09
mov bl, 1
jmp 0x40ba5f