Function at 0x40dc00
Capabilities:
Acquire debug privileges
Check mutex on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [0x4594d4]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
push str.ENIGMA_SHD_Mutex
xor edi, edi
push edi
push edi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esp + 0x20], eax
cmp eax, edi
je 0x40dc61
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40dc61
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0042bbc1
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x1c]
push ecx
push 0x28
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40dd1a
mov esi, dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov ebx, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push edx
push str.SeShutdownPrivilege
push edi
call esi
test eax, eax
je 0x40dca9
push ebx
lea ecx, [esp + 0x14]
call fcn.0040d940
add esp, 4
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x10]
push eax
push str.SeBackupPrivilege
push edi
call esi
test eax, eax
je 0x40dccb
push ebx
lea ecx, [esp + 0x14]
call fcn.0040d940
add esp, 4
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push ecx
push str.SeRestorePrivilege
push edi
call esi
test eax, eax
je 0x40dced
push ebx
lea ecx, [esp + 0x14]
call fcn.0040d940
add esp, 4
mov ebx, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push edx
push str.SeDebugPrivilege
push edi
call esi
test eax, eax
je 0x40dd0f
push ebx
lea ecx, [esp + 0x14]
call fcn.0040d940
add esp, 4
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040e590
lea edx, [esp + 0x3c]
push edx
call fcn.00443bd0
add esp, 4
call fcn.004430e0
call fcn.00444ba0
test al, al
je 0x40dd49
push 1
call fcn.004424f0
add esp, 4
push edi
call fcn.004424f0
add esp, 4
cmp dword [esp + 0x58], edi
jbe 0x40e0d9
xor eax, eax
mov word [esp + 0x7c], ax
push edi
mov eax, 0x44c4c8
lea esi, [esp + 0x7c]
mov dword [esp + 0x94], 7
mov dword [esp + 0x90], edi
call fcn.00406a40
mov ecx, dword [esp + 0x54]
mov edi, dword [ecx]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov esi, dword [esp + 0x54]
test ebx, ebx
je 0x40dda4
cmp ebx, dword [esp + 0x3c]
je 0x40dda9
call fcn.0042c47c
cmp edi, esi
je 0x40deb4
test ebx, ebx
jne 0x40ddd8
call fcn.0042c47c
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x40ddc6
call fcn.0042c47c
lea esi, [edi + 0xc]
mov edi, dword [esi + 0x18]
lea ecx, [esi + 4]
cmp edi, 8
jb 0x40dddc
mov edx, dword [ecx]
jmp 0x40ddde
mov eax, dword [ebx]
jmp 0x40ddbc
mov edx, ecx
mov eax, dword [esi + 0x14]
add eax, eax
lea ebx, [edx + eax]
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x40de16
cmp edi, 8
jb 0x40ddf7
mov edx, dword [ecx]
jmp 0x40ddf9
mov edx, ecx
cmp edx, dword [esp + 0x18]
ja 0x40de12
cmp edi, 8
jb 0x40de06
mov ecx, dword [ecx]
mov ebx, dword [esp + 0x18]
add ecx, eax
cmp ebx, ecx
jbe 0x40de1b
jmp 0x40de16
mov ebx, dword [esp + 0x18]
call fcn.0042c47c
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40de47
call fcn.0042c47c
xor eax, eax
mov edx, dword [esp + 0x14]
cmp edx, dword [eax + 0x18]
jne 0x40de38
call fcn.0042c47c
mov edx, dword [esi + 0x18]
lea eax, [esi + 4]
cmp edx, 8
jb 0x40de4b
mov edi, dword [eax]
jmp 0x40de4d
mov eax, dword [eax]
jmp 0x40de2a
mov edi, eax
test edi, edi
je 0x40de71
cmp edx, 8
jb 0x40de5a
mov ecx, dword [eax]
jmp 0x40de5c
mov ecx, eax
cmp ecx, edi
ja 0x40de71
cmp edx, 8
jb 0x40de67
mov eax, dword [eax]
mov ecx, dword [esi + 0x14]
lea edx, [eax + ecx*2]
cmp edi, edx
jbe 0x40de76
call fcn.0042c47c
mov eax, dword [esp + 0x20]
push ebx
push esi
push edi
push esi
push eax
lea eax, [esp + 0x8c]
call fcn.0040ef30
push 1
push 0x4504d8
lea eax, [esp + 0x80]
call fcn.00406920
lea esi, [esp + 0x10]
call fcn.0040ebf0
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
jmp 0x40dd96
xor ecx, ecx
push 0x13
mov eax, 0x4504dc
lea esi, [esp + 0x60]
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], 0
mov word [esp + 0x64], cx
call fcn.00406a40
mov edx, esi
push edx
call fcn.00444fd0
mov eax, dword [esp + 0x64]
mov esi, 8
add esp, 4
cmp dword [esp + 0x74], esi
jae 0x40def9
lea eax, [esp + 0x60]
push 0x450504
push eax
call fcn.0042c197
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40dfb2
mov eax, dword [esp + 0x8c]
add eax, eax
shr eax, 2
mov ecx, eax
and ecx, 0x80000001
mov dword [esp + 0x18], eax
jns 0x40df30
dec ecx
or ecx, 0xfffffffe
inc ecx
je 0x40df37
inc eax
mov dword [esp + 0x18], eax
push ebx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call fcn.0042ce39
mov eax, dword [esp + 0x8c]
add esp, 0x10
cmp dword [esp + 0x90], esi
jae 0x40df5d
lea eax, [esp + 0x7c]
mov edi, 2
cmp dword [esp + 0x18], edi
jl 0x40dfa9
mov esi, eax
lea ebx, [ebx]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x14]
lea edx, [esp + 0x10]
mov dword [esp + 0x14], ecx
call fcn.0040d1b0
push ebx
push 2
push 4
push edx
call fcn.0042ce39
add edi, 2
add esp, 0x10
add esi, 8
cmp edi, dword [esp + 0x18]
jle 0x40df70
mov esi, 8
push ebx
call fcn.0042c900
add esp, 4
cmp dword [esp + 0x74], esi
jb 0x40dfc5
mov eax, dword [esp + 0x60]
push eax
call fcn.0042bbb6
add esp, 4
xor ecx, ecx
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], 0
mov word [esp + 0x60], cx
cmp dword [esp + 0x90], esi
jb 0x40dff2
mov edx, dword [esp + 0x7c]
push edx
call fcn.0042bbb6
add esp, 4
xor edi, edi
push edi
push edi
push edi
push edi
call dword [sym.imp.USER32.dll_DefWindowProcW]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 0x20
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.0040cdf0
push edi
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
call sub.gdiplus.dll_GdiplusStartup
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x24]
push eax
push ecx
call fcn.0040d9b0
mov edx, dword [esp + 0x30]
add esp, 8
push edx
mov ebx, eax
call sub.gdiplus.dll_GdiplusShutdown
call fcn.0040cf50
mov esi, dword [0x45b8ac]
cmp esi, edi
je 0x40e09a
mov eax, dword [esi]
cmp eax, edi
je 0x40e07b
push eax
call fcn.0042cacf
add esp, 4
mov dword [esi], edi
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40e08e
push eax
call fcn.0042cacf
add esp, 4
mov dword [esi + 4], edi
push esi
mov dword [esi + 8], edi
call fcn.0042bbb6
add esp, 4
call fcn.0040cb40
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [esp + 0x3c]
call fcn.0040e620
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0042bbb6
mov ecx, dword [esp + 0x98]
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0042bbc1
mov esp, ebp
pop ebp
ret 0x10
mov esi, 8
jmp 0x40dff4