joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4015d0
Capabilities:
Acquire debug privileges
Create process on windows
Impersonate user

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40639d
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x40b040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
xorps xmm0, xmm0
push 0x10
movups xmmword [ecx], xmm0
push str.SeDebugPrivilege
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00401a80
call fcn.00401200
mov ecx, esp
xorps xmm0, xmm0
push 0x16
push str.SeImpersonatePrivilege
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00401a80
call fcn.00401200
add esp, 0x18
call fcn.00401320
push esi
push 0
push 0x440
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4017ad
lea eax, [ebp - 0x44]
push eax
push 0x2000000
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4017a6
lea eax, [ebp - 0x48]
mov dword [ebp - 0x54], 0xc
push eax
push 2
push 2
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 0
push eax
push 0x2000000
push dword [ebp - 0x44]
mov dword [ebp - 0x4c], 0
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4017b2
cmp dword [ebp + 0x1c], 7
lea ecx, [ebp - 0x40]
push ecx
xorps xmm0, xmm0
lea ecx, [ebp - 0x98]
push ecx
push 0
push 0
movlpd qword [ebp - 0x98], xmm0
lea eax, [ebp - 0x30]
movlpd qword [ebp - 0x8c], xmm0
movlpd qword [ebp - 0x84], xmm0
movlpd qword [ebp - 0x7c], xmm0
movlpd qword [ebp - 0x74], xmm0
movlpd qword [ebp - 0x6c], xmm0
movlpd qword [ebp - 0x64], xmm0
movlpd qword [ebp - 0x5c], xmm0
movups xmm0, xmmword [str.Winsta0Default]
mov dword [ebp - 0x90], eax
lea eax, [ebp + 8]
cmova eax, dword [ebp + 8]
push 0x400
push eax
movups xmmword [ebp - 0x30], xmm0
push 0
movups xmm0, xmmword [0x407444]
push 1
push dword [ebp - 0x48]
movups xmmword [ebp - 0x20], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
je 0x4017ad
mov ecx, dword [ebp + 0x1c]
cmp ecx, 7
jbe 0x40178c
mov edx, dword [ebp + 8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401782
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401782
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00405714
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00401fd0
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00401fd0
int3
Function at 0x402350
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406488
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x40b040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0xa
push 0x65
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40250b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x40250b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40250b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40250b
push 0xb
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
push str.C:Windows_
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0
movups xmmword [ebp - 0x28], xmm0
call fcn.00401a80
push 0x40767c
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.00401e40
push 0xb0
lea eax, [ebp - 0xd8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0xd8]
cmova eax, dword [ebp - 0x28]
push eax
call fcn.00403350
mov eax, dword [ebp - 0xd8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd8], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xd8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xdc], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xd8]
mov eax, dword [ebp - 0xd8]
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
test al, al
jne 0x40250b
push 0
push edi
push esi
lea ecx, [ebp - 0xd8]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
lea ecx, [ebp - 0xd4]
call fcn.004032c0
test eax, eax
jne 0x4024a9
push eax
mov eax, dword [ebp - 0xd8]
lea ecx, [ebp - 0xd8]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0xd8]
call fcn.00402520
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x4024f0
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4024e6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4024e6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00405714
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret
call fcn.00401fd0
int3
Function at 0x402950
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40297c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x4029a4
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x4029aa
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x402a12
jg 0x4029c1
test esi, esi
je 0x402a12
test ecx, ecx
jl 0x402a0d
jg 0x4029cb
test eax, eax
je 0x402a0d
cmp edi, ecx
jg 0x4029df
jl 0x4029d5
cmp esi, eax
jae 0x4029df
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x402a15
mov ecx, dword [ebp + 8]
jmp 0x402a1f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402a39
jg 0x402a1f
test esi, esi
je 0x402a39
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402a39
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402a50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x402a7c
jl 0x402a70
test ecx, ecx
jne 0x402a7c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402a95
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x402ae3
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x402ae9
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x402ae9
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x402b56
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402b12
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x402b44
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x402b56
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402b20
test edi, edi
je 0x402b56
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402ed0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40b040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x402f00
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x402f3c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x402f3c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x403013
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x402f64
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x402f70
movsx eax, bl
jmp 0x402fa8
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x402fd2
sub eax, 1
je 0x402fd2
sub eax, 2
jne 0x403013
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402ff0
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x403013
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004054cb
mov esp, ebp
pop ebp
ret 4
Function at 0x4031f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x40b040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x4032ac
cmp byte [esi + 0x3d], 0
je 0x4032ac
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40329a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x403261
sub eax, 1
je 0x403265
sub eax, 2
jne 0x40329a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403283
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40329a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004054cb
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004054cb
mov esp, ebp
pop ebp
ret
Function at 0x405e54
Capabilities:
Parse pe header

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

Function at 0x401219
Capabilities:
Terminate process

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40701c
push 0x40109a
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push eax
fnstcw word [esp]
or word [esp], 0x300
fldcw word [esp]
add esp, 4
push 0
push 0
push 0x407028
push 0x407024
push 0x407020
call sub.CRTDLL.DLL___GetMainArgs
push dword [0x407028]
push dword [0x407024]
push dword [0x407020]
mov dword [0x407014], esp
call fcn.0040129c
add esp, 0x18
xor ecx, ecx
mov dword [ebp - 4], ecx
push eax
call sub.CRTDLL.DLL_exit
leave
ret

Function at 0x40129c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push esi
push edi
xor edi, edi
mov dword [ebp - 0x84], 0
call fcn.004019a8
mov edi, eax
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
mov eax, edi
or al, 0x40
push eax
lea eax, [0x4046e9]
lea edx, [fcn.00401a2c]
sub eax, edx
push eax
push fcn.00401a2c
call sub.KERNEL32.dll_VirtualProtect
cmp dword [ebp - 4], 0
je 0x401337
push edi
call fcn.00401883
lea eax, [ebp - 0x84]
push eax
push edi
call fcn.004018d1
add esp, 0xc
mov eax, edi
add eax, 0x1e200
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x84]
push eax
mov eax, dword [ebp - 0x88]
mov edx, edi
inc edx
imul eax, edx
push eax
or edi, edi
je 0x401328
mov esi, 0
jmp 0x40132e
lea esi, [0x4070e4]
push esi
call fcn.00401a2c
add esp, 0xc
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x4019a8
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
push edi
and dword [ebp - 0x120], 0
xor edi, edi
push 0
push 0
call sub.USER32.DLL_GetWindow
push 0
push 0
call sub.SHLWAPI.DLL_PathAppendA
mov dword [ebp - 0x11c], 0x14
mov byte [ebp - 0x104], 0
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x118]
push eax
push 1
push 1
lea eax, [ebp - 0x104]
push eax
call sub.CRYPT32.DLL_CryptBinaryToStringW
call sub.KERNEL32.dll_GetLastError
push 0
push 0
call sub.SHLWAPI.DLL_PathAppendW
movzx eax, word [ebp - 0x118]
mov edi, eax
sub edi, 0x41
mov eax, edi
pop edi
leave
ret
Function at 0x4016d1
Capabilities:
Set thread local storage value

Disassembly:
jmp 0x455423
push ebp
push esp
pop ebp
push esi
push 0x4c1170
push 0x4c1168
push str.FlsSetValue
push 3
call fcn.00455142
add esp, 0x10
mov esi, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
test esi, esi
je 0x455458
push esi
pop ecx
call dword [section..00cfg]
call esi
jmp 0x45545e
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
pop ebp
ret

Function at 0x4018cf
Capabilities:
Set thread local storage value

Disassembly:
jmp 0x49371a
push ecx
pop ecx
push ebp
mov ebp, esp
push esi
push 0x4c44b0
push 0x4c44a8
push str.FlsSetValue
push 0x21
call fcn.00493238
mov esi, eax
add esp, 0x10
or esi, esi
je 0x493754
push dword [ebp + 0xc]
push esi
pop ecx
push dword [ebp + 8]
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x401a69
Capabilities:
Print debug messages

Disassembly:
jmp 0x49d2e7
mov edi, edi
push ebp
push esp
pop ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov esi, dword [ebp + 8]
test eax, eax
setne bl
test eax, eax
je 0x49d1a5
test esi, esi
je 0x49d196
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call fcn.00401b13
cmp eax, 1
je 0x49d1a5
push 4
pop eax
jmp 0x49d1ec
call fcn.00404c5f
cmp eax, 2
jne 0x49d1e6
call fcn.00402eb9
test al, al
je 0x49d1e6
call fcn.00404e1c
test al, al
jne 0x49d1d7
mov eax, dword [ebp + 0x10]
or eax, 0x200000
push eax
push dword [ebp + 0xc]
push esi
push 0
call fcn.00404e03
jmp 0x49d1ec
call fcn.00401ac8
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
push eax
jmp 0x49d1d0
movzx eax, bl
add eax, 3
pop esi
pop ebx
pop ebp
ret
nop
nop
push ebp
push esp
pop ebp
pop ebp
jmp 0x49d172

Function at 0x401b72
Capabilities:
Print debug messages

Disassembly:
jmp 0x4acb10
mov edi, edi
push ebp
push esp
pop ebp
sub esp, 0xc
mov eax, dword [0x4e11d0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
push ebx
push esi
je 0x4acb6c
mov esi, dword [ebp + 8]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4acb30
sub esi, ecx
lea ebx, [esi + 1]
or ebx, ebx
je 0x4acb6c
lea eax, [ebx + ebx]
call fcn.0040353f
push esp
pop eax
push esi
push dword [ebp + 8]
mov dword [ebp - 8], eax
push ebx
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00402441
add esp, 0x14
or eax, eax
jne 0x4acb6c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea esp, [ebp - 0x14]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403102
leave
ret 4

Function at 0x401b8b
Capabilities:
Enumerate pe sections

Disassembly:
jmp 0x4afb50
push ebp
push esp
pop ebp
mov eax, dword [ebp + 8]
sub edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x4afb8c
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x4afb84
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x4afb8e
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x4afb74
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x402905
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
jmp 0x42f6b8
push ebp
push esp
pop ebp
mov ecx, dword [ebp + 8]
sub edx, edx
cmp dword [ebp + 0x10], edx
jbe 0x42f6dc
push esi
mov esi, dword [ebp + 0xc]
movzx eax, byte [edx + esi]
xor eax, ecx
imul ecx, eax, 0x1000193
inc edx
cmp edx, dword [ebp + 0x10]
jb 0x42f6c9
pop esi
push ecx
pop eax
pop ebp
ret
Function at 0x4036cf
Capabilities:
Terminate process

Disassembly:
jmp 0x455ce9
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x455cfa
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.00405ace
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x403800
Capabilities:
Query environment variable

Disassembly:
jmp 0x49f792
push edi
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
or esi, esi
jne 0x49f7a3
pop esi
ret
push ebx
push edi
push esi
call fcn.0049f679
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004040f2
push eax
pop edi
pop ecx
pop ecx
test edi, edi
je 0x49f7cb
push ebx
push esi
push edi
call fcn.004058a8
add esp, 0xc
push 0
call fcn.00406456
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
push edi
pop eax
pop edi
pop ebx
pop esi
ret

Function at 0x403878
Capabilities:
Get thread local storage value

Disassembly:
jmp 0x4936cc
nop
nop
push ebp
mov ebp, esp
push esi
push 0x4c44a4
push 0x4c449c
push str.FlsGetValue
push 0x20
call fcn.00493238
push eax
pop esi
add esp, 0x10
test esi, esi
je 0x493703
push dword [ebp + 8]
push esi
pop ecx
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40397c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
jmp 0x4ae887
push edi
pop edi
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4e11d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
push edi
or esi, esi
jne 0x4ae8b7
mov esi, 0x4e541c
xor edx, edx
xor edi, edi
inc edx
test ecx, ecx
jne 0x4ae8f7
mov ecx, 0x4bd14e
mov dword [ebp - 0x28], edi
push edx
pop eax
mov dword [ebp - 0x18], ecx
mov dword [ebp + 0x10], eax
sub eax, eax
cmp word [esi + 6], ax
jne 0x4ae950
mov bl, byte [ecx]
inc ecx
mov dword [ebp - 0x18], ecx
test bl, bl
js 0x4ae913
or edi, edi
je 0x4ae8eb
movzx eax, bl
mov dword [edi], eax
sub eax, eax
test bl, bl
setne al
jmp 0x4aea36
push ecx
pop edi
mov dword [ebp - 0x18], ecx
neg edi
sbb edi, edi
and edi, ebx
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x28], edi
jne 0x4ae8d0
push 0xfffffffffffffffe
pop eax
jmp 0x4aea36
mov al, bl
and al, 0xe0
cmp al, 0xc0
jne 0x4ae91f
mov bh, 2
jmp 0x4ae939
mov al, bl
and al, 0xf0
cmp al, 0xe0
jne 0x4ae92b
mov bh, 3
jmp 0x4ae939
mov al, bl
and al, 0xf8
cmp al, 0xf0
jne 0x4aea2b
mov bh, 4
push 7
movzx eax, bh
pop ecx
sub ecx, eax
mov byte [ebp - 0x11], bh
shl edx, cl
mov cl, bh
dec edx
movzx eax, bl
and edx, eax
jmp 0x4ae975
mov bh, byte [esi + 4]
mov edx, dword [esi]
mov al, bh
mov cl, byte [esi + 6]
sub al, 2
cmp al, 2
ja 0x4aea2b
cmp cl, 1
jb 0x4aea2b
cmp cl, bh
jae 0x4aea2b
movzx eax, cl
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x24], eax
jae 0x4ae989
mov eax, dword [ebp - 0x24]
mov dword [ebp + 0x10], eax
mov edi, dword [ebp - 0x18]
sub edi, dword [ebp - 0x20]
mov dword [ebp - 0x20], edi
cmp edi, eax
mov edi, dword [ebp - 0x28]
jae 0x4ae9c0
mov eax, dword [ebp - 0x18]
mov bl, byte [eax]
inc eax
inc dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov al, bl
and al, 0xc0
cmp al, 0x80
jne 0x4aea2b
movzx eax, bl
and eax, 0x3f
shl edx, 6
or edx, eax
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x20], eax
jb 0x4ae999
cmp eax, dword [ebp - 0x24]
jae 0x4ae9df
movzx eax, bh
mov word [esi + 4], ax
mov eax, dword [ebp + 0x10]
sub cl, al
movzx eax, cl
mov dword [esi], edx
mov word [esi + 6], ax
jmp 0x4ae90b
cmp edx, 0xd800
jb 0x4ae9ef
cmp edx, 0xdfff
jbe 0x4aea2b
cmp edx, 0x10ffff
ja 0x4aea2b
movzx eax, bh
mov dword [ebp - 0x10], 0x80
mov dword [ebp - 0xc], 0x800
mov dword [ebp - 8], 0x10000
cmp edx, dword [ebp + eax*4 - 0x18]
jb 0x4aea2b
or edi, edi
je 0x4aea1b
mov dword [edi], edx
neg edx
push esi
sbb edx, edx
and edx, dword [ebp - 0x24]
push edx
call fcn.00406889
jmp 0x4aea34
push dword [ebp - 0x1c]
push esi
call fcn.00406226
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403102
leave
ret