Function at 0x40104e
Capabilities:
Check mutex on windows
Move file

Disassembly:
mov eax, 0x401524
call fcn.00401370
sub esp, 0x32c
push ebx
push esi
xor esi, esi
push str.DOWNLOAD_SHELL_MUTEX_NAME
push esi
mov ebx, ecx
push esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401090
cmp dword [ebp - 0x14], esi
je 0x401090
mov dword [ebp - 0x18], 1
and byte [ebp - 0x234], 0
push edi
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x233]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x10], esi
mov esi, 0x104
stosb byte es:[edi], al
lea eax, [ebp - 0x234]
push esi
push eax
mov ecx, ebx
call fcn.0040128d
test eax, eax
je 0x4011ef
lea eax, [ebp - 0x234]
push eax
call sub.MSVCRT.dll_strlen
mov edi, eax
mov dword [esp], str.DownTemp
mov dword [ebp - 0x1c], edi
call sub.MSVCRT.dll_strlen
mov ebx, dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [eax + edi + 1]
cmp eax, esi
pop ecx
jae 0x40116e
and byte [ebp - 0x130], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x12f]
and byte [ebp - 0x338], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x337]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x234]
push str.DownTemp
mov edi, str._s_s
push eax
push edi
lea eax, [ebp - 0x130]
push esi
push eax
call ebx
add esp, 0x14
lea eax, [ebp - 0x234]
push str.Download
push eax
push edi
lea eax, [ebp - 0x338]
push esi
push eax
call ebx
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 0x1c
push str.Utility.dll
call sub.MSVCRT.dll_strlen
mov edi, eax
mov dword [esp], str.Common_
call sub.MSVCRT.dll_strlen
pop ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, edi
add ecx, eax
cmp ecx, esi
jae 0x4011ef
and byte [ebp - 0x130], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x12f]
push str.Utility.dll
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x234]
push eax
push str._sCommon_s
lea eax, [ebp - 0x130]
push esi
push eax
call ebx
add esp, 0x14
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x4011ef
push str.CreateLogObjects
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4011ef
call eax
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
je 0x40124b
push str.factory.dll
lea ecx, [ebp - 0x2c]
call fcn.004012d4
cmp dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
je 0x40123f
push 2
call dword [ebp - 0x28]
mov esi, eax
pop ecx
cmp esi, ebx
je 0x40123f
mov eax, dword [esi]
push 0x10011
push str.DlImpl.dll
push ebx
mov ecx, esi
call dword [eax + 8]
mov edi, eax
cmp edi, ebx
je 0x40123f
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
mov eax, dword [esi]
push ebx
push edi
mov ecx, esi
call dword [eax + 0xc]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.0040132d
cmp dword [ebp - 0x14], ebx
pop edi
je 0x40125a
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], ebx
je 0x40127c
push str.ReleaseLogObjects
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x401273
call eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret