joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41ab15
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x466008]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41ab58
cmp word [esi], dx
jne 0x41ab58
or byte [edi + eax + 0x28], 4
jmp 0x41ab5d
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x41acb0
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x41ac90
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x41ab9f
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41abd5
cmp eax, edx
jae 0x41abe1
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x41ab77
jmp 0x41acb0
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x41ac8c
cmp dword [ebp - 0x14], 0
je 0x41ac8c
mov eax, dword [ebx*4 + 0x466008]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41ac64
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x41ac2d
mov word [esi], cx
jmp 0x41ac60
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x466008]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x466008]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x466008]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x41acb0
pop ebx
cmp word [ebp - 4], bx
jne 0x41ac75
cmp esi, dword [ebp + 0xc]
jne 0x41ac75
mov word [esi], bx
jmp 0x41acad
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041b549
add esp, 0x10
cmp word [ebp - 4], bx
je 0x41acb0
push 0xd
jmp 0x41aca9
mov ecx, dword [ebx*4 + 0x466008]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41aca7
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41acb0
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x401000
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x110
push ebp
mov ebp, dword [esp + 0x124]
test ebp, ebp
jne 0x40101f
mov eax, 0x80070057
pop ebp
add esp, 0x110
ret
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
lea eax, [esp + 4]
push esi
push eax
push 0x20019
push 0
push ecx
push edx
mov esi, 0x80004005
mov dword [ebp], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4010de
lea eax, [esp + 0xc]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x128]
lea edx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push 0
push eax
push ecx
mov dword [esp + 0x24], 0x104
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4010d3
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push edi
push eax
push eax
lea edx, [esp + 0x24]
push 0xffffffffffffffff
push edx
push eax
push eax
call ebx
mov esi, eax
dec esi
push esi
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, eax
test edi, edi
je 0x4010c4
push esi
push edi
lea eax, [esp + 0x24]
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
push 0
mov dword [ebp], edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
pop edi
xor esi, esi
pop ebx
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ebp
add esp, 0x110
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
nop
mov ecx, 0x74f464af
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
nop
nop
mov ebx, 0x42e1d0
nop
mov ecx, 0x143b518c
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
xor dword [eax], ecx
add eax, 4
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x40672b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
pushal
call 0x40673a
pop dword [ebp - 0x40]
mov eax, 0x559fb67f
sub eax, 0x555f4f45
sub dword [ebp - 0x40], eax
mov dword [ebp - 0x50], 0xfee6f73c
sub dword [ebp - 0x50], 0xb094b1f1
mov dword [ebp - 0x4c], 0x84a4f260
add dword [ebp - 0x4c], 0xad8e59e5
mov dword [ebp - 0x48], 0xa1f12192
sub dword [ebp - 0x48], 0x55a4dd64
mov dword [ebp - 0x44], 0x6593dc4d
sub dword [ebp - 0x44], 0x6593dc4d
lea eax, [ebp - 0x50]
push eax
mov eax, 0x46f9a2e
sub eax, 0x42f192a
add eax, dword [ebp - 0x40]
call dword [eax]
mov dword [ebp - 0x50], 0xb663727a
add dword [ebp - 0x50], 0xbe0ef6dc
mov dword [ebp - 0x4c], 0x1a6e5c51
sub dword [ebp - 0x4c], 0xd901fadc
mov dword [ebp - 0x48], 0xcee24831
add dword [ebp - 0x48], 0x948d243b
mov dword [ebp - 0x44], 0xfbf57eef
sub dword [ebp - 0x44], 0xfbf57eef
lea ebx, [ebp - 0x50]
push ebx
push eax
mov eax, 0xc4022213
add eax, 0x3c3e5eed
add eax, dword [ebp - 0x40]
call dword [eax]
push 0x40
push 0x1000
push 0x3ad19
push 0
call eax
mov ecx, 0x5536
xor ebx, ebx
add ebx, eax
mov edi, 0x5f68bc55
sub edi, 0x5f21d855
add edi, dword [ebp - 0x40]
mov edx, 0x133fac3f
add edx, 0xfe4f38ee
sub dword [ebp - 0x34], edx
mov esi, dword [edi]
add dword [ebp - 0x10], edx
sub esi, edx
xor dword [ebp - 0x38], ebx
mov dword [ebx], esi
mov dword [ebp - 0x14], 0x369c6112
add ebx, 4
add edi, 4
loop 0x406858
add eax, 0x147ab
mov ebx, eax
add eax, 5
mov ecx, 0x400000
add ecx, dword [ebp - 0x40]
call ebx
leave
ret
Function at 0x402a00
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x1c
mov dword [0x410d78], eax
push ebx
push ebp
push esi
push edi
call fcn.004028f0
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
push 1
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
push ecx
call esi
test eax, eax
je 0x402a55
cmp dword [esp + 0x14], 0x12
je 0x402a74
lea edx, [esp + 0x10]
push edx
call edi
lea eax, [esp + 0x10]
push eax
call ebx
mov al, byte [0x410fbc]
test al, al
je 0x402a2d
call ebp
sub eax, dword [0x410cfc]
cmp eax, 0x3e8
jbe 0x402a2d
call fcn.004027e0
jmp 0x402a2d
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x10
Function at 0x404830
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
push ebp
push esi
push edi
push 2
push eax
mov esi, ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x4049d3
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esp + 0x14], eax
je 0x4049d3
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
xor ecx, ecx
xor eax, eax
mov cx, word [ebp + 8]
mov dword [esi + 4], ecx
mov ax, word [ebp + 4]
mov dword [esi], eax
mov bx, word [esi]
add bx, 3
mov dword [esi + 8], eax
and ebx, 0xfffc
cmp word [ebp + 0xe], 8
mov dword [esp + 0x10], ebx
jne 0x4049d3
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x4048bf
mov dword [ebp + 0x20], 0x100
mov edx, dword [ebp]
mov edi, dword [ebp + 0x20]
mov eax, ebp
add eax, edx
test edi, edi
jle 0x40490c
lea ecx, [esp + 0x18]
add eax, 2
movzx bx, byte [eax]
movzx dx, byte [eax - 1]
and ebx, 0x1f8
and edx, 0x3ff8
shl ebx, 5
add edx, ebx
mov bl, byte [eax - 2]
shr bl, 3
movzx bx, bl
add eax, 4
add ecx, 2
lea edx, [ebx + edx*4]
dec edi
mov word [ecx - 2], dx
jne 0x4048d4
mov ebx, dword [esp + 0x10]
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
imul eax, dword [esi + 4]
shl eax, 1
push eax
push 0
call edi
mov ecx, dword [esi + 4]
mov dword [esi + 0xc], eax
shl ecx, 2
push ecx
push 0
call edi
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x10], eax
test ecx, ecx
je 0x4049d3
test eax, eax
je 0x4049d3
mov edx, dword [ebp + 0x20]
mov ecx, dword [ebp]
mov eax, dword [esi + 4]
xor edi, edi
lea edx, [ebp + edx*4]
add edx, ecx
test eax, eax
jle 0x4049c8
and ebx, 0xffff
mov dword [esp + 0x10], ebx
mov eax, edi
mov ecx, dword [esi + 0x10]
imul eax, dword [esi]
mov dword [ecx + edi*4], eax
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + edi*4]
mov eax, dword [esi + 0xc]
lea ecx, [eax + ecx*2]
mov dword [0x4110bc], ecx
mov eax, dword [esi + 4]
sub eax, edi
mov ebp, dword [esi]
dec eax
xor ecx, ecx
imul eax, ebx
add eax, edx
test ebp, ebp
jle 0x4049c0
mov ebp, dword [0x4110bc]
xor ebx, ebx
mov bl, byte [eax]
mov bx, word [esp + ebx*2 + 0x18]
mov word [ebp], bx
mov ebp, dword [0x4110bc]
add ebp, 2
inc eax
mov dword [0x4110bc], ebp
mov ebx, dword [esi]
inc ecx
cmp ecx, ebx
jl 0x404992
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 4]
inc edi
cmp edi, eax
jl 0x404962
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
Function at 0x4055d0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d008
push 0x407a08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x411134], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x411130], ecx
shl ecx, 8
add ecx, edx
mov dword [0x41112c], ecx
shr eax, 0x10
mov dword [0x411128], eax
call fcn.004079c0
test eax, eax
jne 0x40563a
push 0x1c
call fcn.00405770
add esp, 4
mov dword [ebp - 4], 0
call fcn.004077c0
call fcn.004077b0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41160c], eax
call fcn.00407380
mov dword [0x4110f0], eax
test eax, eax
je 0x40566d
mov eax, dword [0x41160c]
test eax, eax
jne 0x405677
push 0xffffffffffffffff
call fcn.00406ce0
add esp, 4
call fcn.004070d0
call fcn.00406fe0
call fcn.00406cb0
mov esi, dword [0x41160c]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x405756
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4056be
test al, al
je 0x4056be
and eax, 0xff
push eax
call fcn.00406f80
add esp, 4
test eax, eax
je 0x405698
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405698
cmp byte [esi], 0x22
jne 0x4056c7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x4056d7
cmp al, 0x20
ja 0x4056d7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4056c7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x4056f8
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x4056fd
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00406ce0
jmp 0x40573b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x4056c7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x405756

Function at 0x406d20
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x411164]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x406d3f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x411160], 1
mov byte [0x41115c], bl
jne 0x406d99
mov ecx, dword [0x411608]
test ecx, ecx
je 0x406d87
mov esi, dword [0x411604]
sub esi, 4
cmp esi, ecx
jb 0x406d87
mov eax, dword [esi]
test eax, eax
je 0x406d80
call eax
mov ecx, dword [0x411608]
sub esi, 4
cmp esi, ecx
jae 0x406d72
push 0x40e018
push 0x40e014
call fcn.00406dd0
add esp, 8
push 0x40e024
push 0x40e01c
call fcn.00406dd0
add esp, 8
test ebx, ebx
jne 0x406dc0
push ebp
mov dword [0x411164], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x407380
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x411278]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x4073c2
call edi
mov esi, eax
test esi, esi
je 0x4073ac
mov eax, 1
jmp 0x4073bd
call ebp
mov ebx, eax
test ebx, ebx
je 0x4074cf
mov eax, 2
mov dword [0x411278], eax
cmp eax, 1
jne 0x407462
test esi, esi
jne 0x4073db
call edi
mov esi, eax
test esi, esi
je 0x4074cf
cmp word [esi], 0
mov eax, esi
je 0x4073f5
add eax, 2
cmp word [eax], 0
jne 0x4073e3
add eax, 2
cmp word [eax], 0
jne 0x4073e3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x407454
push edi
call fcn.00405fa0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407454
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x407446
push ebx
call fcn.00405f50
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x4074cf
test ebx, ebx
jne 0x407473
call ebp
mov ebx, eax
test ebx, ebx
je 0x4074cf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40748b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40747b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40747b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00405fa0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4074ad
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x407b20
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40e7f0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x407b44
add eax, 8
inc ebp
cmp eax, 0x40e880
jb 0x407b35
cmp ecx, dword [ebp*8 + 0x40e7f0]
jne 0x407ceb
mov eax, dword [0x4110f8]
cmp eax, 1
je 0x407cad
test eax, eax
jne 0x407b70
cmp dword [0x40e404], 1
je 0x407cad
cmp ecx, 0xfc
je 0x407ceb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407bab
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x407bf4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40d3a4
add ebx, ecx
push ebx
call fcn.00409bc0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40d384
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40e7f4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00409b30
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x411500]
test eax, eax
je 0x407cbe
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x407cc8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40e7f4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x40b840
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40b9fe
push 0x3d
push edi
call fcn.0040bce0
mov esi, eax
add esp, 8
test esi, esi
je 0x40b9fe
cmp edi, esi
je 0x40b9fe
mov dl, byte [esi + 1]
mov ecx, dword [0x411148]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x411144]
cmp eax, ecx
jne 0x40b897
push eax
call fcn.0040bad0
add esp, 4
mov dword [0x411144], eax
test eax, eax
jne 0x40b912
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40b8be
mov eax, dword [0x41114c]
test eax, eax
je 0x40b8be
call fcn.0040b1a0
test eax, eax
je 0x40b90d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x40b8ca
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00405fa0
add esp, 4
mov dword [0x411144], eax
test eax, eax
je 0x40b9fe
mov dword [eax], 0
mov eax, dword [0x41114c]
test eax, eax
jne 0x40b90d
push 4
call fcn.00405fa0
add esp, 4
mov dword [0x41114c], eax
test eax, eax
je 0x40b9fe
mov dword [eax], 0
mov eax, dword [0x411144]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.0040ba50
mov esi, eax
add esp, 8
test esi, esi
jl 0x40ba0f
cmp dword [ebx], 0
je 0x40ba0f
test ebp, ebp
je 0x40ba07
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00405f50
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x40b969
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x40b958
lea eax, [esi*4]
push eax
push ebx
call fcn.0040bb40
add esp, 8
test eax, eax
je 0x40b983
mov dword [0x411144], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40b9f6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00405fa0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40b9f6
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.00405f50
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x40b987
test ebp, ebp
jne 0x40b9f6
test esi, esi
jge 0x40ba19
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0040bb40
add esp, 8
test eax, eax
je 0x40b9fe
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x411144], eax
jmp 0x40b987
Function at 0x401c84
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x238
cmp byte [edx + 0x48], 0
call fcn.00401c9c
Function at 0x413f24
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
lea eax, [edx + eax*2]
mov dword [esp], eax
xor eax, eax
cmp edx, dword [esp]
je 0x413f82
movzx ebp, byte [edx + 1]
cmp byte [edx], ch
lea ebx, [edx + 2]
lea esi, [eax + ebp]
jne 0x413f68
cmp eax, esi
ja 0x413fba
cmp esi, dword [esp + 0x20]
ja 0x413fba
add eax, dword [esp + 0x1c]
test ebp, ebp
je 0x413f70
dec ebp
cmp byte [eax], cl
lea eax, [eax + 1]
jne 0x413f5a
jmp 0x413f76
mov edx, ebx
mov eax, esi
jbe 0x413f39
jmp 0x413f82
mov edx, ebx
mov eax, esi
jmp 0x413f39
xor eax, eax
and al, 1
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esp + 0x28]
movzx ecx, cx
mov al, 1
add ebx, edi
cmp edi, ebx
je 0x413f78
movzx edx, byte [edi]
lea esi, [edi + 1]
test dl, dl
js 0x413f9f
mov edi, esi
jmp 0x413fb2
cmp esi, ebx
je 0x413fba
movzx esi, byte [edi + 1]
and edx, 0x7f
add edi, 2
shl edx, 8
or edx, esi
sub ecx, edx
js 0x413f78
xor al, 1
jmp 0x413f8d
ud2