Function at 0x413480
Capabilities:
Check mutex on windows
Create or open mutex on windows
Enumerate gui resources
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5374d6
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x587be0]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push esi
push edi
mov eax, dword [0x587be0]
xor eax, esp
push eax
lea eax, [esp + 0x250]
mov dword fs:[0], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], 8
mov dword [esp + 0x28], 0xff
call fcn.00418e86
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x48]
push eax
lea ecx, [esp + 0x18]
call fcn.00402cb0
xor ebx, ebx
mov dword [esp + 0x258], ebx
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x413509
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.004029f0
cmp dword [0x58ea80], 2
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x565aa8
push 1
push ebx
jne 0x4135c5
call edi
mov edx, dword [0x58ea88]
mov edx, dword [edx + 4]
cmp edx, ebx
jne 0x413537
xor eax, eax
jmp 0x41354f
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x413540
sub eax, esi
sar eax, 1
push eax
push edx
mov ecx, 0x5901d4
call fcn.00402bc0
push ebx
push ebx
push ebx
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [0x58f98c], eax
xor eax, eax
movzx edx, ax
mov eax, edx
shl edx, 0x10
push 0x58f9e8
or eax, edx
mov ecx, 0x80
mov edi, 0x58f9e8
push 0x200
rep stosd dword es:[edi], eax
call esi
push 0x56560c
lea ecx, [esp + 0x14]
call fcn.00402cb0
push 0x208
lea eax, [esp + 0x40]
push eax
push ebx
mov byte [esp + 0x264], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x41362e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4136f5
call edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x41355b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x18]
push eax
push 0x4138a0
mov dword [esp + 0x20], ebx
call dword [sym.imp.USER32.dll_EnumWindows]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
mov dword [esp + 0x258], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413627
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x41383e
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00402cb0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x25c], 2
call fcn.00402580
mov byte [esp + 0x258], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413676
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push 0x5c
push ecx
call fcn.005130a6
add esp, 8
cmp eax, ebx
jne 0x41368e
or eax, 0xffffffff
jmp 0x413694
sub eax, dword [esp + 0x10]
sar eax, 1
inc eax
push eax
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x18]
call fcn.00404ad0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x25c], 3
call fcn.00402580
mov byte [esp + 0x258], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4136de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x58f9e8
push 0x200
call esi
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov edi, dword [esp + 0x1c]
mov ecx, edi
call fcn.00422832
push ebx
call fcn.004232e5
add esp, 4
push 0xc
call fcn.00413966
add esp, 4
mov dword [esp + 0x1c], eax
mov byte [esp + 0x258], 4
cmp eax, ebx
je 0x413735
mov ecx, eax
call fcn.00423a94
push str.Local_AppWizard_Generated_Applications
mov ecx, edi
mov byte [esp + 0x25c], 1
call fcn.00423c23
push ebx
lea eax, [esp + 0x30]
push eax
push 0x58ffe8
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
call fcn.0040c2e0
push 0x1c
call fcn.00413966
add esp, 4
cmp eax, ebx
je 0x41378a
mov esi, eax
call fcn.00401a70
jmp 0x41378c
xor eax, eax
mov dword [0x58f9e0], eax
mov dword [eax], ebx
mov dword [eax + 0x18], ebx
call fcn.00418e86
mov eax, dword [eax + 8]
push eax
call fcn.00411a60
add esp, 4
push 0xac8
call fcn.00413966
add esp, 4
mov dword [esp + 0x1c], eax
mov byte [esp + 0x258], 5
cmp eax, ebx
je 0x4137cc
push eax
call fcn.00404c50
jmp 0x4137ce
xor eax, eax
mov byte [esp + 0x258], 1
mov dword [edi + 0x20], eax
mov edx, dword [eax]
push ebx
mov ecx, eax
mov eax, dword [edx + 0x160]
push 0x66
call eax
mov esi, eax
mov byte [esp + 0x258], bl
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x413811
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x258], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41383c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x250]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.00511f1b
mov esp, ebp
pop ebp
ret