joyce8/EMBER2024-capa huggingface dataset:
Function at 0x651f10
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x6669fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov esi, dword [esp + 0x2c]
xor ebp, ebp
mov dword [esp + 0x10], eax
xor ebx, ebx
mov eax, 1
mov ecx, ebx
shl eax, cl
mov ecx, dword [esp + 0x10]
test ecx, eax
je 0x652002
lea edx, [ebx + 0x41]
lea eax, [esp + 0x14]
push edx
push str._c:_
push eax
call fcn.00655dff
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x652002
lea edx, [esp + 0x14]
push edx
push str.Mounting__s_n
call fcn.0064d6e0
lea eax, [esp + 0x1c]
lea edi, [esi + 0x1048]
push eax
push edi
mov word [esp + 0x28], bp
call fcn.0065620b
push 0x10
call fcn.006561d3
add esp, 0x14
mov dword [esp + 0x2c], eax
cmp eax, ebp
mov dword [esp + 0x24], ebp
je 0x651fc5
mov cx, word [edi]
push ecx
mov ecx, eax
call fcn.006421c0
jmp 0x651fc7
xor eax, eax
push esi
mov dword [esp + 0x28], 0xffffffff
mov dword [esi], eax
call fcn.00651b80
mov edi, dword [esi]
add esp, 4
cmp edi, ebp
je 0x651ff0
mov ecx, edi
call fcn.006422c0
push edi
call fcn.006561c8
add esp, 4
mov edx, dword [esi + 0x1024]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x652021
inc ebx
cmp ebx, 0x20
jb 0x651f3e
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x653250
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x667808
push 0x657288
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
xor esi, esi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x24], bl
mov dword [ebp - 4], ebx
mov byte [ebp - 0x34], bl
mov byte [ebp - 0x33], bl
mov byte [ebp - 0x32], bl
mov byte [ebp - 0x31], bl
mov byte [ebp - 0x30], bl
mov byte [ebp - 0x2f], 5
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x653329
lea edx, [ebp - 0x28]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x653329
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push 1
mov ecx, dword [ebp - 0x28]
push ecx
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call edi
mov edx, dword [ebp - 0x2c]
push edx
call fcn.006561d3
add esp, 4
mov esi, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0x653329
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push esi
push 1
mov edx, dword [ebp - 0x28]
push edx
call edi
test eax, eax
je 0x653329
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [esi]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x24], al
jmp 0x65332c
mov al, byte [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.00653351
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x653d20
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x653d58
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop esi
pop ecx
ret 0x10

Function at 0x653d60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x653d94
mov eax, dword [esp + 0x14]
test eax, eax
je 0x653d94
push eax
push esi
call fcn.0065620b
add esp, 8
pop esi
ret 0x10

Function at 0x653da0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
lea eax, [esp + 0x28]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x653e22
push ebx
mov ebx, dword [esp + 0x30]
push esi
xor esi, esi
test ebx, ebx
jbe 0x653e15
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x18]
push 0x66c320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00655dff
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push 0
push 0
push eax
push ecx
call ebp
inc esi
add edi, 4
cmp esi, ebx
jb 0x653dda
pop edi
pop ebp
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
add esp, 0x24
ret 0xc

Function at 0x653e30
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x28
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x653ec2
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
test ebp, ebp
jbe 0x653eb5
push ebx
mov ebx, dword [esp + 0x40]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [esp + 0x1c]
push 0x66c320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00655dff
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x40]
push eax
push 0
push 0
push ecx
push edx
call edi
test eax, eax
jne 0x653eab
mov ax, word [esp + 0x14]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, ebp
jb 0x653e6a
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
add esp, 0x28
ret 0xc
Function at 0x654000
Capabilities:
Get file version info

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0x654131
push esi
call fcn.00657145
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call fcn.00646080
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0x654131
push 0
push ebp
call fcn.006463a0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ebx, eax
call fcn.00646260
add esp, 0x20
mov dword [esp + 0x18], eax
test eax, eax
jne 0x65408b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 0
push 0
push 6
push eax
call fcn.006462f0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x654121
push 0x66c918
push edi
call fcn.006553f0
push eax
push ebx
push esi
call fcn.00653f60
push 0x66c8f8
push edi
call fcn.006553f0
push eax
push ebx
push esi
call fcn.00653f60
push 0x66c8d8
push edi
call fcn.006553f0
push eax
push ebx
push esi
call fcn.00653f60
push 0x66c8c0
push edi
call fcn.006553f0
add esp, 0x44
push eax
push ebx
push esi
call fcn.00653f60
push 0x66c8a0
push edi
call fcn.006553f0
push eax
push ebx
push esi
call fcn.00653f60
push 0x66c888
push edi
call fcn.006553f0
push eax
push ebx
push esi
call fcn.00653f60
add esp, 0x34
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x6551b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00655140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00655140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00655140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00655140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0x655bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x655c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x66787c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x655c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x655c52
xor eax, eax
pop esi
leave
ret 4
Function at 0x402004
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
jmp fcn.0041faab

Function at 0x403b94
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [0x40902c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x403be7
xor eax, eax
push ebp
push 0x403bcf
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 4]
jmp fcn.0041fa7d
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret

Function at 0x404f90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push ebx
xor edx, edx
mov dword [ebp - 0x10c], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x404ffa
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x105
lea eax, [ebp - 0x105]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
lea eax, [ebp - 0x10c]
lea edx, [ebp - 0x105]
call fcn.004031c4
mov eax, dword [ebp - 0x10c]
mov edx, ebx
call fcn.00404db8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405001
lea eax, [ebp - 0x10c]
call fcn.00403094
ret

Function at 0x405008
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push ebx
xor edx, edx
mov dword [ebp - 0x10c], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x405072
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x105]
push eax
push 0x105
call sub.kernel32.dll_GetTempPathA
lea eax, [ebp - 0x10c]
lea edx, [ebp - 0x105]
call fcn.004031c4
mov eax, dword [ebp - 0x10c]
mov edx, ebx
call fcn.00404db8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405079
lea eax, [ebp - 0x10c]
call fcn.00403094
ret

Function at 0x406d40
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff64
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x9c], edx
mov edi, eax
xor eax, eax
push ebp
push 0x406dfc
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x97]
push eax
push 0x97
call sub.kernel32.dll_GetLogicalDriveStringsA
xor ebx, ebx
jmp 0x406dd5
mov esi, ebx
and esi, 0xff
lea eax, [ebp + esi - 0x97]
push eax
call sub.kernel32.dll_GetDriveTypeA
sub eax, 5
je 0x406dd2
jmp 0x4203f9
add bl, 4
xor eax, eax
mov al, bl
cmp byte [ebp + eax - 0x97], 0
jne 0x406d79
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406e03
lea eax, [ebp - 0x9c]
call fcn.00403094
ret

Function at 0x41fa57
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 4], ecx
call dword [0x425094]
mov ecx, dword [ebp + 8]
mov esi, eax
xor ebx, ebx
add esi, esi
or edx, 0xffffffff
cmp dword [0x42ed00], ebx
Function at 0x40153b
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push esp
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [esp + 0x2c], 1
je 0x401554
movzx esi, word [esp + 0x30]
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x4044e0], eax
mov dword [ebp - 0x4c], 0x30
call fcn.0040152b
mov dword [ebp - 0x48], 3
mov dword [ebp - 0x44], 0x40120e
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], str.Trick
mov dword [ebp - 0x20], eax
call fcn.0040151e
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test eax, eax
je 0x401626
mov eax, 0x80000000
push edi
push dword [ebp - 0x38]
push edi
push edi
push eax
push eax
push eax
push eax
push 0x80
push str.Qindom
push str.Trick
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0
push eax
mov dword [0x4044e8], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x4044e8]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push edi
push edi
push edi
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
je 0x401626
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
push ebx
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [ebp - 0x1c]
push eax
call edi
lea ecx, [ebp - 0x1c]
push ecx
call ebx
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
jne 0x40160a
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
nop
pop eax
nop
nop
add eax, 0x40729f
nop
sub eax, 0x407245
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
jl 0x432030
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43201e
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x40174e
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40178d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40178d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40178d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40178d
cmp dword [ecx + 0x74], 0xe
jbe 0x40178d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x407426
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4074c3
push ebx
push esi
call fcn.004073ef
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00407338
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x407470
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4074c2
push edi
push eax
call fcn.00408026
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x407490
call fcn.00405f61
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4074c1
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00407338
add esp, 0x20
test eax, eax
jne 0x4074af
push edi
call fcn.00405f61
jmp 0x4074b7
push ebx
call fcn.00405f61
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4087a9
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x412060
push 0x412058
push str.FlsAlloc
push 0x1e
call fcn.0040866a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4087dd
push dword [ebp + 8]
mov ecx, esi
call dword [0x410124]
call esi
jmp 0x4087e3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x408827
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x412070
push 0x412068
push str.FlsGetValue
push 0x20
call fcn.0040866a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40885e
push dword [ebp + 8]
mov ecx, esi
call dword [0x410124]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40dc40
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40dc6d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40dc6d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401aed
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, ecx
xor ebx, ebx
mov dword [ebp - 4], eax
mov esi, dword [esi]
and esi, 7
cmp edx, 5
jae 0x401b10
xor eax, eax
jmp 0x401c3b
add dword [ebp + 8], 5
sub edx, 4
add edx, eax
mov dword [ebp - 0xc], edx
push edi
lea edi, [ebx + eax]
cmp edi, edx
jae 0x401b34
mov al, byte [edi]
and al, 0xfe
cmp al, 0xe8
je 0x401b31
inc edi
cmp edi, edx
jb 0x401b24
mov eax, dword [ebp - 4]
mov ecx, edi
sub ecx, ebx
mov ebx, edi
sub ecx, eax
sub ebx, eax
cmp edi, edx
jae 0x401c29
cmp ecx, 2
jbe 0x401bbd
xor esi, esi
movzx ecx, byte [edi + 4]
lea eax, [ecx + 1]
test al, 0xfe
jne 0x401c17
movzx eax, byte [edi + 3]
mov edx, dword [ebp + 8]
shl ecx, 8
add edx, ebx
or ecx, eax
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 1]
shl ecx, 8
or ecx, eax
mov eax, ecx
add ecx, edx
sub eax, edx
cmp dword [ebp + 0x10], 0
cmove ecx, eax
mov dword [ebp - 8], ecx
mov edx, ecx
test esi, esi
je 0x401bf1
and esi, 6
mov eax, ecx
shl esi, 2
mov ecx, esi
shr eax, cl
inc eax
test al, 0xfe
jne 0x401bef
mov eax, dword [ebp + 8]
mov edx, 0x100
shl edx, cl
add eax, ebx
dec edx
xor edx, dword [ebp - 8]
cmp dword [ebp + 0x10], 0
je 0x401bed
add edx, eax
jmp 0x401bef
shr esi, cl
test esi, esi
je 0x401b4d
cmp esi, 4
ja 0x401be2
cmp esi, 3
je 0x401be2
mov eax, esi
shr eax, 1
movzx eax, byte [eax + edi + 1]
inc eax
test al, 0xfe
jne 0x401b4d
mov eax, dword [ebp - 4]
or esi, 8
shr esi, 1
inc ebx
jmp 0x401b1d
sub edx, eax
xor esi, esi
mov eax, edx
mov byte [edi + 1], dl
shr eax, 8
mov byte [edi + 2], al
mov eax, edx
shr edx, 0x18
shr eax, 0x10
and dl, 1
neg dl
mov byte [edi + 3], al
push 5
mov byte [edi + 4], dl
mov edx, dword [ebp - 0xc]
pop eax
jmp 0x401c1f
or esi, 8
xor eax, eax
shr esi, 1
inc eax
add ebx, eax
mov eax, dword [ebp - 4]
jmp 0x401b1d
xor eax, eax
shr esi, cl
cmp ecx, 2
pop edi
cmova esi, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov eax, ebx
pop esi
pop ebx
leave
ret 0xc

Function at 0x405435
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
call fcn.00405418
mov edx, eax
test edx, edx
jne 0x405479
xor ecx, ecx
cmp dword [esi + 0x18], ecx
jne 0x405475
lea eax, [ebp - 4]
push eax
push ecx
push esi
push fcn.00406308
push ecx
push ecx
call fcn.0041e29e
add esp, 0x18
mov dword [esi + 0x18], eax
test eax, eax
jne 0x405475
call fcn.004066d8
mov edx, eax
test edx, edx
jne 0x405479
xor eax, eax
jmp 0x405486
movzx eax, dx
or eax, 0x80070000
test edx, edx
cmovle eax, edx
pop esi
leave
ret
Function at 0x406561
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
xor edx, edx
xor eax, eax
push ebx
push esi
mov esi, ecx
inc eax
push edi
push 0x20
pop ecx
or dword [esi + 0x90], 0xffffffff
or dword [esi + 0x94], 0xffffffff
mov dword [esi + 0x30], eax
mov dword [esi + 0x44], eax
mov eax, dword [esi + 4]
cmp eax, ecx
mov dword [ebp - 4], esi
cmova eax, ecx
mov dword [esi + 0x78], edx
mov dword [esi + 0x54], eax
mov eax, dword [esi]
mov dword [esi + 0x7c], edx
mov dword [esi + 0x34], edx
mov dword [esi + 0x38], edx
mov dword [esi + 0x3c], edx
mov dword [esi + 0x40], edx
mov dword [esi + 0x70], edx
mov dword [esi + 0x88], edx
mov dword [esi + 0x68], edx
mov dword [esi + 0x6c], edx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], edx
mov dword [esi + 0x50], edx
mov dword [esi + 0x60], edx
mov dword [esi + 0x64], edx
mov dword [esi + 0x80], edx
mov dword [esi + 0x84], edx
mov dword [esi + 0x58], edx
cmp eax, dword [esi + 0x20]
je 0x406611
lea edi, [esi + 0xc8]
mov ebx, ecx
cmp dword [edi + 8], edx
je 0x4065f0
mov ecx, edi
call fcn.00405489
xor edx, edx
add edi, 0x28
sub ebx, 1
jne 0x4065e2
cmp dword [esi + 0x5c], ebx
je 0x40660c
mov eax, dword [esi + 0x14]
push dword [esi + 0x5c]
push eax
call dword [eax + 4]
xor edx, edx
mov dword [esi + 0x5c], edx
mov eax, dword [esi]
mov dword [esi + 0x20], eax
mov ecx, dword [esi + 0x58]
mov eax, dword [esi + 0x10]
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], edx
lea eax, [ecx + 5]
mov dword [esi + 0xa0], edx
imul ebx, eax, 0x28
lea eax, [ecx + 1]
mov dword [esi + 0xa4], edx
mov dword [esi + 0xa8], edx
mov dword [esi + 0xac], edx
mov dword [esi + 0x24], edx
add ebx, esi
mov dword [esi + 0x28], edx
mov ecx, ebx
mov dword [esi + 0x58], eax
call fcn.00405418
mov edi, eax
test edi, edi
jne 0x4066a3
lea ecx, [ebx + 0x20]
call fcn.0040670a
mov edi, eax
test edi, edi
jne 0x4066a3
lea ecx, [ebx + 0x1c]
call fcn.0040670a
mov edi, eax
test edi, edi
jne 0x4066a3
push ebx
call fcn.00406308
mov edi, eax
test edi, edi
je 0x4066a3
and dword [esi + 0x44], 0
lea ebx, [esi + 0xc8]
push 0x20
pop esi
mov ecx, ebx
call fcn.004054ad
add ebx, 0x28
sub esi, 1
jne 0x406691
mov esi, dword [ebp - 4]
movzx eax, di
or eax, 0x80070000
test edi, edi
cmovle eax, edi
test eax, eax
je 0x4066b7
mov dword [esi + 0x40], eax
xor edx, edx
cmp dword [esi + 0x38], edx
jne 0x4066cb
cmp dword [esi + 0x40], edx
jne 0x4066cb
cmp dword [esi + 0x3c], edx
jne 0x4066cb
mov dword [esi + 0x44], edx
xor ecx, ecx
cmp dword [esi + 0x44], edx
pop edi
pop esi
cmovne eax, ecx
pop ebx
leave
ret