Function at 0x41dd40
Capabilities:
Check mutex on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x442fe7
mov eax, dword fs:[0]
push eax
sub esp, 0x29c
mov eax, dword [0x459780]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
cmp dword [ebp + 8], 1
jle 0x41e0d0
call dword [sym.imp.USER32.dll_SetProcessDPIAware]
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x4468fc
push 0
push 0
call edi
mov dword [ebp - 0x298], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41e0c4
push str.LUNA_UPDATER_BLOCK
push 0
push 0
call edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41e1dd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x21c]
push 0x5c
push eax
call sub.msvcrt.dll_wcsrchr
xor ecx, ecx
push 0x5c
mov word [eax], cx
lea eax, [ebp - 0x21c]
push eax
call sub.msvcrt.dll_wcsrchr
add esp, 0x10
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [ebp - 0x290], 0
lea eax, [ebp - 0x24c]
push dword [ebp - 0x290]
mov byte [ebp - 4], 1
push 2
push 0x44694c
push eax
call fcn.0041c470
add esp, 0x10
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 2
mov byte [ebp - 0x290], 0
mov edx, dword [eax + 4]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41de63
push dword [ebp - 0x290]
sub ecx, esi
lea eax, [ebp - 0x234]
sar ecx, 1
push ecx
push edx
push eax
call fcn.0041c470
add esp, 0x10
xorps xmm0, xmm0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x264]
movups xmmword [ebp - 0x284], xmm0
movups xmmword [ebp - 0x274], xmm0
call fcn.0041c8e0
cmp dword [ebp - 0x250], 7
lea ecx, [ebp - 0x284]
push 0xffffffffffffffff
push 0x3e
lea eax, [ebp - 0x264]
mov dword [ebp - 0x28c], 0
cmova eax, dword [ebp - 0x264]
push ecx
push eax
mov dword [ebp - 0x288], 0x45902c
call fcn.00434799
mov esi, eax
test esi, esi
jne 0x41df0f
mov eax, dword [ebp - 0x274]
mov ecx, 6
shr eax, 0xa
test al, 1
mov eax, 0x3e
cmovne eax, ecx
mov dword [ebp - 0x268], eax
jmp 0x41df36
push esi
mov dword [ebp - 0x268], 0
call fcn.0041e230
add esp, 4
test al, al
jne 0x41df36
mov dword [ebp - 0x28c], esi
mov dword [ebp - 0x288], 0x45902c
cmp dword [ebp - 0x28c], 0
je 0x41df62
cmp dword [ebp - 0x250], 7
lea eax, [ebp - 0x264]
mov dword [ebp - 0x254], 0
cmova eax, dword [ebp - 0x264]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebp - 0x28c], 0
mov byte [ebp - 4], 4
jne 0x41df8e
lea eax, [ebp - 0x28c]
push eax
push 0x12
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.0041caa0
add esp, 0x10
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 3
call fcn.0041ca10
cmp dword [ebp - 0x28c], 0
jne 0x41e1f4
lea ecx, [ebp - 0x234]
call fcn.00402490
lea ecx, [ebp - 0x24c]
call fcn.00402490
push 0
push str.Success
push str.Update_success
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
lea edi, [ebp - 0x21c]
mov dword [ebp - 4], 0
mov byte [ebp - 4], 7
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x41dff0
mov ecx, 7
mov byte [ebp - 0x290], al
mov esi, str.cacheupdate
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x21c]
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41e020
push dword [ebp - 0x290]
sub ecx, edx
lea eax, [ebp - 0x234]
sar ecx, 1
push ecx
push esi
push eax
call fcn.0041c470
add esp, 0x10
cmp dword [ebp - 0x220], 7
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 8
cmova eax, dword [ebp - 0x234]
push eax
call fcn.00434b0a
mov ecx, edx
movzx eax, al
cdq
mov dword [ebp - 0x294], eax
mov dword [ebp - 0x290], edx
mov dword [ebp - 0x28c], ecx
mov dword [ebp - 0x288], 0x45902c
cmp ecx, 0x91
jne 0x41e0b1
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0041d9a0
mov ecx, dword [ebp - 0x28c]
add esp, 0xc
test ecx, ecx
jne 0x41e213
lea ecx, [ebp - 0x234]
call fcn.00402490
push dword [ebp - 0x298]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043520e
mov esp, ebp
pop ebp
ret
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41ddb0
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x28c]
push eax
push str.copy
call fcn.0041db60
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x28c]
push eax
push str.remove_all
call fcn.00414020
int3