joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10022799
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10040018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.1001d12d
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.1001d12d
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x10022810
cmp word [ecx], dx
je 0x10022810
mov eax, dword [0x100326ac]
push edi
dec eax
push eax
push 0x10032598
call fcn.10022738
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x10022883
cmp word [eax], dx
je 0x10022883
mov eax, dword [edi]
test eax, eax
je 0x10022834
cmp word [eax], dx
je 0x10022834
lea eax, [ebp - 0x10]
push eax
call fcn.1002211b
jmp 0x1002283d
lea eax, [ebp - 0x10]
push eax
call fcn.100221b6
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x100228ad
mov eax, dword [0x10032594]
push dword [ebp - 0x14]
dec eax
push eax
push 0x10032288
call fcn.10022738
add esp, 0xc
test al, al
je 0x100228ad
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x10022878
cmp word [eax], di
je 0x10022878
lea eax, [ebp - 0x10]
push eax
call fcn.1002211b
pop ecx
jmp 0x100228af
lea eax, [ebp - 0x10]
push eax
call fcn.100221b6
jmp 0x10022875
mov eax, dword [edi]
test eax, eax
je 0x1002289a
cmp word [eax], dx
je 0x1002289a
lea eax, [ebp - 0x10]
push eax
call fcn.100220d0
pop ecx
jmp 0x100228ad
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x10022978
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.100225bd
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10022978
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x10022978
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x10022978
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10022905
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.1001d9f2
test ebx, ebx
je 0x10022973
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.1001d9f2
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10022978
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10022978
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.100294f0
add esp, 0x10
xor eax, eax
inc eax
jmp 0x1002297a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000cff6
leave
ret
Function at 0x10024367
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1000d8b0
mov eax, dword [0x10040018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.1001f58e
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x100243a9
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10024505
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1002b4c0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x10041eb0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.1002510c
mov ecx, dword [esi*4 + 0x10041eb0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x100244fe
cmp eax, dword [ecx + edi + 0x24]
jne 0x100244fe
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100244fe
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1002510c
add esp, 0x14
test edx, edx
jl 0x100244fe
jg 0x10024474
test eax, eax
jb 0x100244fe
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x100244fe
jl 0x1002448e
cmp dword [ebp - 0x1008], eax
ja 0x100244fe
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x100244ac
test ebx, ebx
je 0x100244e5
cmp ecx, edi
jae 0x100244e5
mov al, byte [ecx]
cmp al, 0xd
jne 0x100244c6
lea eax, [edi - 1]
cmp ecx, eax
jae 0x100244d2
cmp byte [ecx + 1], 0xa
jne 0x100244d2
inc ecx
jmp 0x100244d2
movzx eax, al
movsx eax, byte [eax + 0x10040958]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x100244ac
cmp edx, ebx
jne 0x100244ac
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10024503
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1000cff6
leave
ret
Function at 0x100245a4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x10041eb0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100245e4
cmp byte [ebx], 0xa
jne 0x100245e4
or byte [edi + eax + 0x28], 4
jmp 0x100245e9
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x100246e8
mov dl, byte [eax]
cmp dl, 0x1a
je 0x100246cb
inc eax
cmp dl, 0xd
je 0x10024615
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x1002463b
cmp eax, ecx
jae 0x10024649
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x100245fd
jmp 0x100246e8
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100246c6
cmp dword [ebp - 0x10], 0
je 0x100246c6
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x10041eb0]
test byte [eax + edi + 0x28], 0x48
je 0x100246a0
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1002468b
mov byte [esi], dl
jmp 0x1002469c
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x10041eb0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x100246e8
cmp byte [ebp - 1], 0xa
jne 0x100246af
cmp esi, ebx
jne 0x100246af
mov byte [esi], 0xa
jmp 0x100246e7
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1002512a
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x100246e8
mov byte [esi], 0xd
jmp 0x100246e7
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x10041eb0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100246e5
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100246e8
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x100246f1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x10041eb0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10024737
cmp word [ebx], dx
jne 0x10024737
or byte [eax + edi + 0x28], 4
jmp 0x1002473c
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x1002489f
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x1002487f
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x1002477d
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x100247b3
cmp eax, edx
jae 0x100247c1
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x10024758
jmp 0x1002489f
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002487a
cmp dword [ebp - 0x18], 0
je 0x1002487a
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x10041eb0]
test byte [eax + edi + 0x28], 0x48
je 0x10024850
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x10024814
mov word [esi], cx
jmp 0x1002484b
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x10041eb0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x10041eb0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x10041eb0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x1002489f
pop eax
cmp word [ebp - 4], ax
jne 0x10024860
cmp esi, ebx
jne 0x10024860
mov word [esi], ax
jmp 0x1002489c
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1002512a
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x1002489f
push 0xd
pop eax
jmp 0x1002485b
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x10041eb0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10024899
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x1002489f
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10026547
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 0x100265e4
push ebx
push esi
call fcn.10026510
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.1001cd57
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10026591
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100265e3
push edi
push eax
call fcn.1001cb3c
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x100265b1
call fcn.1001cb02
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100265e2
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1001cd57
add esp, 0x20
test eax, eax
jne 0x100265d0
push edi
call fcn.1001cb02
jmp 0x100265d8
push ebx
call fcn.1001cb02
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 0x1002b3e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1002b40d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1002b40d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x409ffb
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00404165
xor ebx, ebx
cmp dword [0x411b4c], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x40a0d0
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x40a03b
xor eax, eax
jmp 0x40a194
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x40a034
push eax
call fcn.00404102
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x411b4c], eax
call esi
push eax
call fcn.00404102
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x411b50], eax
call esi
push eax
call fcn.00404102
mov dword [0x411b54], eax
lea eax, [ebp - 8]
push eax
call fcn.00404bde
test eax, eax
pop ecx
pop ecx
je 0x40a09e
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00402aee
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x40a0d0
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00404102
cmp eax, ebx
pop ecx
mov dword [0x411b5c], eax
je 0x40a0d0
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00404102
pop ecx
mov dword [0x411b58], eax
mov eax, dword [0x411b58]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x40a149
cmp dword [0x411b5c], esi
je 0x40a149
push eax
call fcn.0040416e
pop ecx
call eax
cmp eax, ebx
je 0x40a116
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x411b5c]
call fcn.0040416e
pop ecx
call eax
test eax, eax
je 0x40a116
test byte [ebp - 0x18], 1
jne 0x40a149
lea eax, [ebp - 0xc]
push eax
call fcn.00404c15
test eax, eax
pop ecx
je 0x40a131
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00402aee
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x40a140
or dword [ebp + 0x10], 0x200000
jmp 0x40a17a
or dword [ebp + 0x10], 0x40000
jmp 0x40a17a
mov eax, dword [0x411b50]
cmp eax, esi
je 0x40a17a
push eax
call fcn.0040416e
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40a17a
mov eax, dword [0x411b54]
cmp eax, esi
je 0x40a17a
push dword [ebp - 4]
push eax
call fcn.0040416e
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x411b4c]
call fcn.0040416e
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403970
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
xor edx, edx
mov eax, edx
and eax, 1
dec eax
not eax
and eax, 0xedb88320
mov ecx, edx
shr ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
shr eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
shr ecx, 1
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
shr eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
shr ecx, 1
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
shr eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
shr ecx, 1
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
shr eax, 1
xor ecx, eax
mov dword [edx*4 + 0x4e83e0], ecx
inc edx
cmp edx, 0x100
jb 0x403972
cmp edx, 0x800
jae 0x403a49
lea esp, [esp]
mov eax, dword [edx*4 + 0x4e7fe0]
mov ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x4e83e0]
inc edx
mov dword [edx*4 + 0x4e83dc], eax
cmp edx, 0x800
jb 0x403a20
mov dword [0x4e7c18], 0x404490
call fcn.00404660
test eax, eax
jne 0x403a66
mov dword [0x4e7c18], 0x404540
ret
Function at 0x406410
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ecx
mov ecx, dword [esp + 0x14]
push ebp
mov ebp, dword [ecx]
mov ecx, dword [esp + 0x10]
xor eax, eax
and ebp, 7
cmp ecx, 5
jae 0x406429
pop ebp
pop ecx
ret
mov edx, dword [esp + 0xc]
push ebx
push esi
mov esi, dword [esp + 0x1c]
add esi, 5
lea edx, [edx + ecx - 4]
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x10], edx
jmp 0x406450
mov ecx, dword [esp + 0x18]
lea edi, [eax + ecx]
cmp edi, edx
jae 0x40646d
jmp 0x406460
mov al, byte [edi]
and al, 0xfe
cmp al, 0xe8
je 0x40646d
inc edi
cmp edi, edx
jb 0x406460
mov eax, edi
sub eax, ecx
mov ecx, eax
sub ecx, dword [esp + 0x1c]
cmp edi, edx
jae 0x406582
cmp ecx, 3
jbe 0x4064a1
xor ebp, ebp
mov cl, byte [edi + 4]
mov dword [esp + 0x1c], eax
test cl, cl
je 0x4064db
cmp cl, 0xff
je 0x4064db
and ebp, 3
add ebp, ebp
or ebp, 1
inc eax
jmp 0x406450
dec ecx
shl ebp, cl
and ebp, 7
je 0x406486
movzx ecx, byte [ebp + 0x41bdec]
mov ebx, edi
sub ebx, ecx
cmp byte [ebp + 0x41bde4], 0
mov cl, byte [ebx + 4]
je 0x4064c9
test cl, cl
je 0x4064c9
cmp cl, 0xff
jne 0x406486
and ebp, 3
add ebp, ebp
mov dword [esp + 0x1c], eax
or ebp, 1
inc eax
jmp 0x406450
movzx edx, cl
movzx ecx, byte [edi + 3]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 2]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 1]
shl edx, 8
or edx, ecx
lea esp, [esp]
cmp dword [esp + 0x28], 0
je 0x40650e
lea ebx, [edx + eax]
add ebx, esi
jmp 0x406514
sub edx, eax
sub edx, esi
mov ebx, edx
test ebp, ebp
je 0x406554
movzx esi, byte [ebp + 0x41bdec]
add esi, esi
add esi, esi
add esi, esi
mov ecx, 0x18
sub ecx, esi
mov edx, ebx
shr edx, cl
test dl, dl
je 0x406539
cmp dl, 0xff
jne 0x406550
mov ecx, 0x20
sub ecx, esi
mov esi, dword [esp + 0x20]
mov edx, 1
shl edx, cl
dec edx
xor edx, ebx
jmp 0x406500
mov esi, dword [esp + 0x20]
mov edx, ebx
shr edx, 0x18
and dl, 1
dec dl
not dl
mov byte [edi + 4], dl
mov edx, ebx
shr edx, 8
mov ecx, ebx
shr ecx, 0x10
mov byte [edi + 2], dl
mov edx, dword [esp + 0x10]
mov byte [edi + 3], cl
mov byte [edi + 1], bl
add eax, 5
jmp 0x406450
pop edi
pop esi
pop ebx
cmp ecx, 3
jbe 0x406595
mov ecx, dword [esp + 0x18]
xor ebp, ebp
mov dword [ecx], ebp
pop ebp
pop ecx
ret
dec ecx
shl ebp, cl
mov ecx, dword [esp + 0x18]
and ebp, 7
mov dword [ecx], ebp
pop ebp
pop ecx
ret
Function at 0x484cde
Capabilities:
Encode data using xor

Disassembly:
mov esi, 0x484a08
and ecx, edx
inc edx
call fcn.00484d0f
add edx, 0x88505b71
mov ecx, edx
xor dword [ebx], esi
or ecx, ecx
add ebx, 2
and ecx, edx
inc ecx
cmp ebx, eax
jl fcn.00484cde
sub ecx, ecx
or edx, edx
ret

Function at 0x43b64f
Capabilities:
Encode data using xor

Disassembly:
mov edi, 0x43b3c1
add esi, 0x1842619e
sub esi, 1
call fcn.0043b68d
sub esi, esi
sub edx, 0x4cd7cd
xor dword [ecx], edi
mov esi, 0x3802d546
inc esi
inc ecx
and edx, edx
mov esi, esi
add esi, 0x51a0745
cmp ecx, eax
jne fcn.0043b64f
and edx, edx
add esi, esi
add esi, esi
ret

Function at 0x402910
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
movsx ecx, byte [eax]
cmp ecx, 0x22
jne 0x402969
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x402953
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
cmp eax, 0x22
je 0x402953
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
jmp 0x402933
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
cmp eax, 0x22
jne 0x402967
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
jmp 0x40297f
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
cmp eax, 0x20
jle 0x40297f
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
jmp 0x402969
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
test eax, eax
je 0x40299f
mov ecx, dword [ebp - 0x4c]
movsx edx, byte [ecx]
cmp edx, 0x20
jg 0x40299f
mov eax, dword [ebp - 0x4c]
add eax, 1
mov dword [ebp - 0x4c], eax
jmp 0x40297f
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402a40
push 0x404004
push section..data
call fcn.00402a10
add esp, 8
mov edx, dword [ebp - 0x1c]
and edx, 1
je 0x4029d8
movzx eax, word [ebp - 0x18]
mov dword [ebp - 0x54], eax
jmp 0x4029df
mov dword [ebp - 0x54], 0xa
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x50], eax
call fcn.00402ab0
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x5d8ab6
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x5d87dc
sub ecx, 0xbc0b905f
or ecx, eax
call fcn.005d8b08
sub ecx, 0xd019480d
or ecx, ecx
mov eax, 0x2a72e0c7
xor dword [edi], edx
add eax, 0xd03c55aa
and eax, ecx
sub ecx, eax
add edi, 2
sub eax, 0xb0c112de
cmp edi, esi
jl fcn.005d8ab6
add ecx, ecx
sub ecx, eax
add ecx, 0x46f7ccb
ret
Function at 0x402768
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov esi, edx
mov ebx, eax
test ebx, ebx
jne 0x402797
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.004034f4
jmp 0x4027b5
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, esi
mov eax, edi
call fcn.004026f0
mov edi, eax
test ebx, ebx
je 0x4027b5
cmp dword [esi], 0
je 0x4027b5
dec ebx
jmp 0x40279e
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x402838
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x41003c], 0x8088405
inc edx
mov dword [0x41003c], edx
mul edx
mov eax, edx
ret

Function at 0x4029c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40f000]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x402a58
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x402a38
xor eax, eax
push ebp
push 0x402a31
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x402a74
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402a38
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x40f000]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40f000], ax
mov esp, ebp
pop ebp
ret