joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415520
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1a8
lea ecx, [esp + 0x10]
call fcn.00408530
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00418db0
mov ecx, eax
mov edi, 0x17
xor ebp, ebp
lea ebx, [esp + 0xa8]
xor ecx, 0xfffffff8
and ecx, eax
neg ecx
sub edi, ecx
cmp edi, 0x1e
mov esi, edi
mov eax, 0x17
cmova esi, eax
push esi
push ebx
call fcn.00408f00
add esp, 8
lea ecx, [esp + 0x10]
push 0x1bb
push ebx
call fcn.00409f80
test eax, eax
je 0x41564f
mov dword [esp + 0x38], 0x72617a61
mov dword [esp + 0x30], 0x61627a75
mov dword [esp + 0x3c], 0
mov dword [esp + 0x2c], 0x726b6d6f
mov dword [esp + 0x34], 0x622e6b63
mov dword [esp + 0x28], 0x742f722f
push 0xffffffffffffffff
lea eax, [esp + 8]
push eax
push 0xfde9
lea eax, [esp + 0x34]
push eax
call fcn.0041a750
add esp, 0x10
xor edi, edi
test eax, eax
je 0x41566f
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
push eax
push dword [esp + 8]
call fcn.004158c0
test eax, eax
sete al
cmp dword [esp + 8], 0xc8
setne cl
or cl, al
cmp cl, 1
je 0x41564f
mov al, 1
test al, al
je 0x41564f
lea ecx, [esp + 0x10]
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 4]
push eax
call fcn.00413f50
mov ecx, dword [esp + 0xc]
test eax, eax
setne dl
cmp ecx, 6
seta dh
xor dh, dl
jne 0x41566f
test eax, eax
je 0x41566f
mov eax, dword [esp]
add ecx, eax
push ecx
push eax
call fcn.00409480
add esp, 8
mov edi, eax
test edi, edi
jne 0x41566f
neg esi
mov edi, 1
inc ebp
sub edi, esi
push 0x4e20
call dword [0x420184]
cmp ebp, 0x10
jl 0x415560
xor edi, edi
mov eax, dword [esp + 4]
test eax, eax
je 0x415680
push eax
call fcn.004193e0
add esp, 4
mov eax, dword [esp]
test eax, eax
je 0x415690
push eax
call fcn.004193e0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00409430
mov eax, edi
add esp, 0x1a8
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x41db80
Capabilities:
Parse pe header

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov esi, ecx
cmp dword [esi + 0x58], 0
je 0x41dd41
mov ecx, dword [esi + 0x28]
cmp ecx, 0x40
jb 0x41dd64
mov eax, dword [esi + 0x24]
mov edx, dword [eax + 0x3c]
lea edi, [edx + 0xf8]
cmp ecx, edi
jb 0x41dd64
movzx edi, word [eax]
cmp edi, 0x5a4d
jne 0x41dd64
cmp ecx, dword [eax + edx + 0x54]
jb 0x41dd64
mov edi, dword [esi + 0x58]
mov bh, 1
test edi, edi
mov dword [esp + 0x1c], edi
jne 0x41dbee
movzx edi, word [eax + edx + 0x16]
mov ebp, edi
xor ebp, 0xdfff
and ebp, edi
test bp, bp
setne bh
xor bh, 1
cmp dword [eax + edx], 0x4550
setne bl
or bl, bh
cmp bl, 1
je 0x41dd64
mov bl, 1
test bl, bl
je 0x41dd64
movzx edi, word [eax + edx + 0x16]
mov ebx, edi
xor ebx, 0xfffd
and ebx, edi
test bx, bx
je 0x41dd64
movzx edi, word [eax + edx + 6]
test edi, edi
mov dword [esp + 0x18], edi
je 0x41dd64
movzx edi, word [eax + edx + 0x14]
cmp edi, 0xe0
jne 0x41dd64
movzx edi, word [eax + edx + 0x18]
cmp edi, 0x10b
jne 0x41dd64
mov edi, dword [eax + edx + 0x74]
test edi, edi
mov dword [esp + 0x14], edi
je 0x41dd1e
lea edi, [eax + edx + 0x7c]
xor ebp, ebp
mov dword [esp + 0x10], edi
mov ebx, dword [esp + 0x10]
cmp ebp, 0xe
mov edi, dword [ebx + ebp*8]
mov ebx, dword [ebx + ebp*8 - 4]
je 0x41dcc2
test ebp, ebp
jne 0x41dd13
cmp dword [esp + 0x1c], 2
jg 0x41dd13
test edi, edi
sete byte [esp + 4]
test ebx, ebx
sete byte [esp + 8]
or edi, ebx
movzx ebx, byte [esp + 8]
sete byte [esp]
xor bl, byte [esp + 4]
jne 0x41dd64
cmp byte [esp], 0
je 0x41dd13
jmp 0x41dd64
mov dword [esp + 4], ebx
mov dword [esp], edi
and edi, 0x76d841f0
not dword [esp]
mov ebx, dword [esp + 4]
mov dword [esp + 0xc], edi
and dword [esp + 4], 0x76d841f0
not ebx
mov dword [esp + 8], ebx
and dword [esp + 8], 0x8927be0f
or ebx, dword [esp]
and dword [esp], 0x8927be0f
mov edi, dword [esp + 8]
not ebx
add dword [esp + 4], edi
mov edi, dword [esp + 0xc]
add edi, dword [esp]
xor edi, dword [esp + 4]
or ebx, edi
jne 0x41dd64
inc ebp
cmp ebp, dword [esp + 0x14]
jb 0x41dc75
lea edx, [eax + edx + 0x10c]
xor edi, edi
mov eax, dword [edx - 4]
add eax, dword [edx]
cmp eax, ecx
ja 0x41dd64
inc edi
add edx, 0x28
mov eax, 1
cmp edi, dword [esp + 0x18]
jl 0x41dd27
jmp 0x41dd71
mov ecx, esi
call fcn.00408d90
test eax, eax
je 0x41dd64
cmp dword [esi + 0x14], 0
je 0x41db93
push esi
call fcn.00412410
add esp, 4
jmp 0x41db93
push 1
push esi
call fcn.00415dd0
add esp, 8
xor eax, eax
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x403fd0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46d73d
mov eax, dword fs:[0]
push eax
mov eax, 0x13b4
call fcn.0046c960
mov eax, dword [0x4833a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x13c0], ebx
mov dword [ebp - 0x13b8], ebx
push 0x3e
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
push str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890
mov dword [ebp - 0x13b8], ebx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00401be0
mov dword [ebp - 4], 0
call dword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov edx, eax
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x13ac], edx
mov ecx, 1
nop
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, ecx
mov dword [ebp + ecx*4 - 0x13ac], edx
inc ecx
cmp ecx, 0x270
jb 0x404060
mov edi, dword [ebp - 0x18]
mov ecx, ebx
push 0
mov dword [ebx], 0
dec edi
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
push 0xa
mov dword [ebp - 0x13b0], 0x270
mov byte [ebx], 0
call fcn.0040a7a0
cmp dword [ebx + 0x14], 0x10
jb 0x4040c1
mov ecx, dword [ebx]
mov edx, ecx
mov dword [ebp - 0x13b4], ecx
jmp 0x4040cb
mov dword [ebp - 0x13b4], ebx
mov edx, ebx
mov ecx, ebx
mov eax, dword [ebx + 0x10]
add eax, edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x13b8], eax
cmp ecx, eax
je 0x404170
cmp edi, 0xffffffff
jne 0x4040f5
lea ecx, [ebp - 0x13b0]
call fcn.004142c0
mov edx, eax
jmp 0x40413e
lea ebx, [edi + 1]
mov dword [ebp - 0x13bc], ebx
jmp 0x404103
lea ebx, [edi + 1]
xor ecx, ecx
xor eax, eax
test edi, edi
je 0x40411b
lea ecx, [ebp - 0x13b0]
call fcn.004142c0
mov ecx, eax
or eax, 0xffffffff
xor edx, edx
div ebx
mov esi, eax
mov ebx, edx
xor edx, edx
mov eax, ecx
div dword [ebp - 0x13bc]
cmp eax, esi
jb 0x404135
cmp ebx, edi
jne 0x404100
mov eax, ecx
xor edx, edx
lea ecx, [edi + 1]
div ecx
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x13b4]
cmovae eax, dword [ebp - 0x28]
mov al, byte [edx + eax]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x13b4], ecx
cmp ecx, dword [ebp - 0x13b8]
jne 0x4040e1
mov ebx, dword [ebp - 0x13c0]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x4041a5
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40419b
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40419b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0046c08d
add esp, 8
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret
Function at 0x405470
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x20
mov eax, dword [0x4833a8]
xor eax, esp
mov dword [esp + 0x1c], eax
lea eax, [esp]
mov dword [esp], 0
push eax
xorps xmm0, xmm0
push 0x20
movlpd qword [esp + 0xc], xmm0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x405507
lea eax, [esp + 4]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x405507
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
push 0
push 0
push 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push 0
push dword [esp + 0x14]
mov dword [esp + 0x24], 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0046be52
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x1c]
xor eax, eax
xor ecx, esp
call fcn.0046be52
mov esp, ebp
pop ebp
ret
Function at 0x408810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40883c
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 + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x40885e
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x408860
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x4088e5
jg 0x408875
test esi, esi
je 0x4088e5
test ecx, ecx
jl 0x4088c8
jg 0x40887f
test eax, eax
je 0x4088c8
cmp edi, ecx
jg 0x408893
jl 0x408889
cmp esi, eax
jae 0x408893
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x1c]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov eax, dword [ebx + 0x30]
sub esi, ecx
mov edx, dword [ebp + 8]
sbb edi, dword [esp + 0x10]
add edx, ecx
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
test edi, edi
jl 0x4088e5
jg 0x4088cb
test esi, esi
je 0x4088e5
jmp 0x4088cb
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x4088e5
push eax
push esi
push 1
push edx
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 + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x408900
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x40892c
jl 0x408920
test esi, esi
jne 0x40892c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x408945
push eax
push esi
push ecx
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, esi
mov edx, dword [eax]
test edx, edx
je 0x40897f
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x40897f
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
cmp dword [ebx + 0x4c], 0
mov edx, edi
je 0x408a00
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x4089a8
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 [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, edi
mov ecx, dword [ebp - 4]
cmp edi, 0xfff
jbe 0x4089ec
nop word [eax + eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call eax
mov ecx, dword [ebp - 4]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x408a13
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x4089c0
test edx, edx
je 0x408a00
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call eax
mov edx, edi
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x408d90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4833a8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x408dc0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x408df0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x408df0
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x408ec6
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x408e19
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 0x408e25
movsx eax, bl
jmp 0x408e5d
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 0x408e87
sub eax, 1
je 0x408e87
sub eax, 2
jne 0x408ec6
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
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x408ea5
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 0x408ec6
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x408ec6
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
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.0046be52
mov esp, ebp
pop ebp
ret 4
Function at 0x40a0e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4833a8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40a19c
cmp byte [esi + 0x3d], 0
je 0x40a19c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40a18a
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 0x40a151
sub eax, 1
je 0x40a155
sub eax, 2
jne 0x40a18a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40a173
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 0x40a18a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046be52
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0046be52
mov esp, ebp
pop ebp
ret
Function at 0x4142c0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], edi
mov eax, dword [edi]
cmp eax, 0x270
jne 0x41431e
lea edx, [edi + 8]
mov esi, eax
nop dword [eax]
mov ecx, dword [edx - 4]
lea edx, [edx + 4]
xor ecx, dword [edx - 4]
and ecx, 0x7fffffff
xor ecx, dword [edx - 8]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edx + 0x62c]
xor eax, ecx
mov dword [edx + 0x9b8], eax
sub esi, 1
jne 0x4142e0
mov eax, dword [edi]
jmp 0x414409
cmp eax, 0x4e0
jb 0x414409
mov eax, dword [edi + 0x9c4]
push ebx
lea ebx, [edi + 0x9c4]
mov edi, 0xe3
nop dword [eax + eax]
mov ecx, dword [ebx + 4]
lea edx, [ebx + 4]
xor ecx, eax
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [ebx + 0x634]
xor eax, ecx
mov dword [ebx - 0x9c0], eax
lea ebx, [edx]
mov eax, dword [edx]
sub edi, 1
jne 0x414340
mov ebx, dword [ebp - 4]
mov edi, 0x18c
add ebx, 0xd50
mov eax, dword [ebx]
nop dword [eax]
mov ecx, eax
lea edx, [ebx + 4]
xor ecx, dword [edx]
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [ebx - 0xd4c]
xor eax, ecx
mov dword [ebx - 0x9c0], eax
lea ebx, [edx]
mov eax, dword [edx]
sub edi, 1
jne 0x414390
mov edi, dword [ebp - 4]
pop ebx
mov ecx, dword [edi + 0x1380]
xor ecx, dword [edi + 4]
and ecx, 0x7fffffff
xor ecx, dword [edi + 0x1380]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edi + 0x634]
xor eax, ecx
mov dword [edi + 0x9c0], eax
xor eax, eax
mov dword [edi], 0
mov edx, dword [edi + eax*4 + 4]
inc eax
mov dword [edi], eax
mov ecx, edx
mov eax, dword [edi + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
pop edi
xor eax, edx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4207b0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x42085f
push esi
call fcn.00434810
add esp, 4
test al, al
jne 0x42085f
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4207d7
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.0043e0a0
add esp, 0xc
test eax, eax
je 0x42080b
sub eax, esi
push eax
push 0x2e
push esi
call fcn.0043e0a0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x42080d
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
lea ebx, [esi + edi]
mov edi, 0x1505
cmp esi, ebx
jae 0x42083e
nop dword [eax]
mov al, byte [esi]
push eax
call fcn.004317a0
movsx ecx, al
inc esi
mov eax, edi
add esp, 4
shl eax, 5
add eax, edi
xor ecx, eax
mov edi, ecx
cmp esi, ebx
jb 0x420820
mov eax, 0x4104105
mov esi, edi
mul edi
sub esi, edx
shr esi, 1
add esi, edx
shr esi, 5
mov ecx, esi
shl ecx, 6
sub ecx, esi
sub edi, ecx
mov eax, edi
pop edi
pop ebx
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x42bd80
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp byte [esi + 0x6cb], 0
je 0x42be1d
cmp dword [esi + 0x1a4], 0
je 0x42bdd7
push esi
call fcn.0041b8f0
push 1
push esi
mov byte [esp + 0x14], al
call fcn.0041bb80
push dword [esi + 0x154]
mov eax, dword [esi + 0x1a4]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push esi
call eax
push dword [esp + 0x28]
push esi
call fcn.0041bb80
add esp, 0x28
pop esi
ret
mov ecx, dword [esp + 0xc]
mov eax, ecx
sub eax, 0
je 0x42bdec
sub eax, 1
je 0x42bdec
sub eax, 1
jne 0x42be1d
push dword [esi + 0x150]
lea eax, [ecx*2 + 0x472ab4]
push 1
add eax, ecx
push 2
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [esi + 0x150]
push 1
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
pop esi
ret

Function at 0x42e4f0
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x42e50a
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x472ef8
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strpbrk
add esp, 8
test eax, eax
je 0x42e552
test ebp, ebp
je 0x42e543
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x42e578
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x42e578
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x42e62f
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e595
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [section..data]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x42e625
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x42e625
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e5c7
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e5e0
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x42e5f0
test ebp, ebp
je 0x42e61c
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x483004]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x483004]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret