joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4162fa
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ecx
push ecx
push ebx
lea eax, [esp + 4]
xor ebx, ebx
push eax
push 0x4352dc
push 1
push ebx
push 0x4353cc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x416480
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
push esi
push ecx
push 0x4353bc
mov esi, dword [eax]
push eax
mov ecx, dword [esi]
call dword [0x433258]
call dword [esi]
test eax, eax
js 0x41646b
push ebp
push edi
mov edi, dword [esp + 0x24]
push 7
pop ebp
cmp byte [esp + 0x1c], bl
je 0x416372
mov edx, edi
cmp dword [edi + 0x14], ebp
jbe 0x41635b
mov edx, dword [edi]
mov eax, dword [esp + 0x14]
push 2
push edx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x14]
mov ecx, esi
call dword [0x433258]
call esi
mov edx, dword [esp + 0x20]
cmp dword [edx + 0x14], ebp
jbe 0x41637d
mov edx, dword [edx]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x50]
mov ecx, esi
call dword [0x433258]
call esi
mov edx, dword [esp + 0x2c]
cmp dword [edx + 0x10], ebx
je 0x4163b7
cmp dword [edx + 0x14], ebp
jbe 0x4163a2
mov edx, dword [edx]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x1c]
mov ecx, esi
call dword [0x433258]
call esi
mov edx, dword [esp + 0x30]
cmp dword [edx + 0x10], ebx
jne 0x4163c8
push ebx
push 0x433688
jmp 0x4163d1
cmp dword [edx + 0x14], ebp
jbe 0x4163cf
mov edx, dword [edx]
push ebx
push edx
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x44]
mov ecx, esi
call dword [0x433258]
call esi
mov edx, dword [esp + 0x34]
cmp dword [edx + 0x10], ebx
je 0x41640a
cmp dword [edx + 0x14], ebp
jbe 0x4163f5
mov edx, dword [edx]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x2c]
mov ecx, esi
call dword [0x433258]
call esi
mov edx, dword [esp + 0x28]
cmp dword [edx + 0x10], ebx
je 0x41642f
cmp dword [edx + 0x14], ebp
jbe 0x41641a
mov edx, dword [edx]
mov eax, dword [esp + 0x10]
push edx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x24]
mov ecx, esi
call dword [0x433258]
call esi
cmp dword [edi + 0x14], ebp
jbe 0x416436
mov edi, dword [edi]
mov eax, dword [esp + 0x14]
push 1
push edi
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x18]
mov ecx, esi
call dword [0x433258]
call esi
mov ebx, eax
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x433258]
call esi
shr ebx, 0x1f
pop edi
xor bl, 1
pop ebp
mov ecx, dword [esp + 8]
push ecx
mov edx, dword [ecx]
mov esi, dword [edx + 8]
mov ecx, esi
call dword [0x433258]
call esi
pop esi
mov al, bl
pop ebx
pop ecx
pop ecx
ret 0x1c
Function at 0x41656e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
push ecx
push esi
push edi
push 0x434580
push dword [esp + 0x18]
push dword [0x45c074]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x416687
push esi
push dword [0x45c074]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x416687
push esi
push dword [0x45c074]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x416687
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x416687
push ebx
push ebp
push edi
xor ebp, ebp
push 2
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x41667f
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x416678
push edi
push esi
push eax
call fcn.0041e590
add esp, 0xc
mov dword [esp + 0x10], ebp
lea eax, [esp + 0x10]
push eax
push ebp
push ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x416671
push ebp
push dword [esp + 0x14]
call fcn.004164e8
mov ecx, dword [esp + 0x10]
mov edi, eax
push ecx
mov edx, dword [ecx]
mov esi, dword [edx + 8]
mov ecx, esi
call dword [0x433258]
call esi
test edi, edi
je 0x416671
mov eax, dword [edi + 8]
mov dword [edi + 8], ebp
test eax, eax
jne 0x41665f
push 0xffffff
lea eax, [esp + 0x18]
push eax
push dword [edi + 4]
call sub.gdiplus.dll_GdipCreateHBITMAPFromBitmap
test eax, eax
je 0x41665f
mov dword [edi + 8], eax
mov eax, dword [edi]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x433258]
mov ecx, edi
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
pop ebp
pop ebx
jmp 0x416689
xor eax, eax
pop edi
pop esi
pop ecx
pop ecx
ret 4
Function at 0x41735b
Capabilities:
Create directory

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x8c
mov eax, dword [0x43f780]
xor eax, ebp
mov dword [ebp + 0x70], eax
push esi
mov esi, dword [ebp + 0x7c]
lea eax, [ebp + 0x18]
push eax
call fcn.00417732
test al, al
je 0x41741b
push ebx
push edi
lea eax, [ebp + 0x18]
mov dword [ebp - 0x18], 0x11060000
xor edi, edi
mov dword [ebp + 4], eax
lea eax, [ebp + 0x14]
mov dword [ebp - 0xc], edi
push eax
push edi
lea eax, [ebp - 0x18]
mov dword [ebp - 8], edi
xor ebx, ebx
mov dword [ebp], edi
inc ebx
mov dword [ebp - 0x10], 3
push eax
push ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], edi
mov dword [ebp + 0x14], edi
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x417419
push ebx
lea eax, [ebp + 0x5c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x41740b
push edi
push dword [ebp + 0x14]
lea eax, [ebp + 0x5c]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x41740b
cmp dword [esi + 0x14], 7
lea eax, [ebp + 0x5c]
mov dword [ebp + 8], 0xc
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], edi
jbe 0x417400
mov esi, dword [esi]
lea eax, [ebp + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [ebp + 0x14], edi
je 0x417419
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop ebx
mov ecx, dword [ebp + 0x70]
xor ecx, ebp
pop esi
call fcn.0041d184
add ebp, 0x74
leave
ret 4

Function at 0x417616
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x43f780]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x43f724], 0
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, 0x400
push edi
mov edi, dword [ebp + 0x14]
jne 0x417671
push 0x64
lea eax, [ebp - 0x130]
push eax
push 0xf
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ax, word [ebp - 0x130]
mov word [0x45c04c], ax
xor eax, eax
mov word [0x45c04e], ax
mov dword [0x43f724], 0x45c04c
push 0x32
lea eax, [ebp - 0x68]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040aee4
push edi
push esi
xor eax, eax
push 0x43f714
mov word [esi], ax
lea eax, [ebp - 0x68]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
mov ecx, dword [ebp - 4]
xor eax, eax
mov word [esi + edi*2 - 2], ax
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0041d184
leave
ret 0x10
Function at 0x417a78
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x20
mov eax, 0x431a1c
call fcn.0041d1f5
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp dword [eax + 0x14], 7
jbe 0x417a91
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push ecx
push 1
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x417b8f
mov eax, dword [ebp + 0x10]
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x417ab7
mov ecx, dword [eax]
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push ebx
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x417b82
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x18]
shr eax, 1
cmp dword [ecx + 0x10], eax
jbe 0x417ae0
mov eax, dword [ecx + 0x10]
inc eax
mov ecx, 0x10000
cmp eax, ecx
jb 0x417aec
mov eax, ecx
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call fcn.004018dd
mov edi, dword [ebp - 0x28]
mov eax, edi
mov esi, dword [ebp - 0x2c]
sub eax, esi
and eax, 0xfffffffe
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x14], 7
jbe 0x417b1c
mov eax, dword [eax]
lea ecx, [ebp - 0x1c]
push ecx
push esi
lea ecx, [ebp - 0x20]
push ecx
push ebx
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x417b6b
mov word [ebp - 0xe], ax
cmp edi, dword [ebp - 0x24]
je 0x417b48
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x28], edi
jmp 0x417b58
lea eax, [ebp - 0xe]
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00417050
mov esi, dword [ebp - 0x2c]
push esi
call fcn.004223ce
pop ecx
mov ecx, dword [ebp + 0x14]
push eax
push esi
call fcn.0040181c
mov bl, 1
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x417b82
mov eax, dword [ebp - 0x24]
sub eax, esi
and eax, 0xfffffffe
push eax
push esi
call fcn.0040127e
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test bl, bl
jne 0x417b9a
push dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
call fcn.00403aaa
mov al, bl
call fcn.0041d1c3
ret 0x14
Function at 0x41b703
Capabilities:
Hide graphical window

Disassembly:
and dword [0x45c058], 0
push 1
push dword [esp + 8]
mov byte [0x45c065], 1
mov byte [0x45c066], 1
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 2
push dword [esp + 0xc]
call fcn.00401a76
cmp dword [0x43f690], 0
jne 0x41b743
cmp byte [0x45c070], 0
je 0x41b74c
cmp dword [0x45c068], 0
jne 0x41b75f
push 0
push 1
push 0x111
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_SendMessageW]
ret 4

Function at 0x41b81f
Capabilities:
Set registry value

Disassembly:
push 0x2c
mov eax, 0x4309db
call fcn.0041d228
cmp byte [0x45bb5c], 0
mov esi, dword [ebp + 8]
je 0x41b908
cmp dword [0x45bb88], 0
je 0x41b908
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
xor ebx, ebx
push 7
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
pop edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], ebx
push eax
push 0x45bb78
call fcn.00419702
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push str.SoftwareWinRAR_SFX
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x41b8ce
mov ecx, esi
cmp dword [esi + 0x14], edi
jbe 0x41b8a1
mov ecx, dword [esi]
lea edx, [ebp - 0x28]
cmp dword [ebp - 0x14], edi
jbe 0x41b8ac
mov edx, dword [ebp - 0x28]
mov eax, dword [esi + 0x10]
lea eax, [eax*2 + 2]
push eax
push ecx
push 1
push ebx
push edx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
cmp eax, edi
jbe 0x41b908
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], ecx
cmp eax, 0x1000
jb 0x41b8ff
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.004016c3
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
push eax
push ecx
call fcn.0041d176
pop ecx
pop ecx
call fcn.0041d1d7
ret 4
Function at 0x41e283
Capabilities:
Parse pe header

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

Function at 0x430410
Capabilities:
Parse pe header

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

Disassembly:
push esi
push edi
push ebx
push ebp
sub esp, 0x18
mov ecx, dword [esp + 0x40]
cmp ecx, 0
jle 0x4011c9
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
movq mm5, qword [esp + 0x44]
movq mm6, qword [esp + 0x4c]
xorps xmm6, xmm6
xorps xmm7, xmm7
xorps xmm1, xmm1
xorps xmm3, xmm3
xorps xmm4, xmm4
xorps xmm5, xmm5
cvtpi2ps xmm6, mm5
cvtpi2ps xmm7, mm6
movlps qword [esp], xmm7
mov eax, 0x3f800000
movd xmm2, eax
pshufd xmm2, xmm2, 0
movss xmm0, dword [ebp]
movss xmm4, dword [edx]
movups xmmword [esp + 8], xmm2
unpcklps xmm0, xmm4
cvttps2pi mm0, xmm0
pxor mm7, mm7
sub ecx, 1
je 0x40112f
movaps xmm2, xmm0
movaps xmm7, xmm0
movss xmm0, dword [ebp + 4]
movss xmm4, dword [edx + 4]
unpcklps xmm0, xmm4
movq mm2, mm0
pcmpeqd mm0, mm6
movhps xmm2, qword [esp]
movlhps xmm6, xmm7
cmpltps xmm2, xmm6
paddd mm0, mm2
add edx, 4
add ebp, 4
cvtpi2ps xmm1, mm0
movd esi, mm0
psrlq mm0, 0x20
add edi, 2
movd eax, mm0
movmskps ebx, xmm2
cvttps2pi mm0, xmm0
cmp ebx, 0
jne 0x401126
pxor xmm2, xmm2
subps xmm7, xmm1
movups xmm1, xmmword [esp + 8]
movaps xmm2, xmm7
subps xmm1, xmm7
imul eax, dword [esp + 0x30]
shl esi, 1
add esi, dword [esp + 0x2c]
add esi, eax
movlhps xmm2, xmm1
shufps xmm7, xmm7, 0
shufps xmm1, xmm1, 0
shufps xmm2, xmm2, 7
mov eax, esi
add eax, dword [esp + 0x30]
movd mm4, dword [esi]
movd mm3, dword [eax]
punpcklwd mm4, mm7
punpcklwd mm3, mm7
cvtpi2ps xmm4, mm4
rdtsc
rol bl, 0x8b
add byte [ecx], al
add dword [ebp - 0x1c7c00a8], ecx
add byte [eax - 9], ah
out dx, al
fst qword [ebx + edx]
xor eax, 0
js 0x401127
mov dword [edx], ecx
ffree st(0)
fld dword [eax]
add ebx, eax
mov eax, eax
add edx, ecx
ja 0x4011cd
mov edx, eax
sub edx, 4
mov edx, dword [edx]
add byte [ecx], al
invalid

Function at 0x44b810
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0xb0
mov al, byte [0x65f049]
mov cl, byte [0x65f048]
xor cl, al
push esi
mov byte [0x65f048], cl
mov cl, byte [0x65f043]
or cl, 8
mov esi, dword [esp + 0xb8]
shr cl, 3
and ecx, 0xff
push 5
mov dword [esp + 8], ecx
fild dword [esp + 8]
fdivr qword [0x662970]
fadd qword [0x65f050]
fstp qword [0x662960]
mov dword [esi], 0
call dword [sym.imp.USER32.dll_GetSysColor]
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
jge 0x44b87e
or dword [esi], 0x4000000
mov al, byte [0x65f046]
mov dl, byte [0x65f045]
xor al, dl
mov byte [0x65f046], al
or al, 0x30
shr al, 4
and eax, 0xff
mov dword [esp + 4], eax
fild dword [esp + 4]
fdivr qword [0x6629d0]
fstp qword [0x662960]
fld qword [0x65f050]
fadd qword [0x662970]
fstp qword [0x662970]
call dword [sym.imp.USER32.dll_EmptyClipboard]
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
mov eax, esi
pop esi
add esp, 0xb0
ret
Function at 0x657e8d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x65f3a8
cmp edx, dword [eax]
je 0x657eaf
add eax, 8
inc ecx
cmp eax, 0x65f438
jl 0x657ea0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x65f3a8]
jne 0x657fdd
mov eax, dword [0xa5bd84]
cmp eax, 1
je 0x657fb7
test eax, eax
jne 0x657ee0
cmp dword [0x65f2d4], 1
je 0x657fb7
cmp edx, 0xfc
je 0x657fdd
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x657f17
lea eax, [ebp - 0x1a4]
push 0x65d558
push eax
call fcn.00658870
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00658d00
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x657f5a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00658d00
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x65d554
push edi
call fcn.0065abd0
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x65d538
push eax
call fcn.00658870
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00658880
lea eax, [ebp - 0xa0]
push 0x65d534
push eax
call fcn.00658880
push dword [esi + 0x65f3ac]
lea eax, [ebp - 0xa0]
push eax
call fcn.00658880
push 0x12010
lea eax, [ebp - 0xa0]
push 0x65d50c
push eax
call fcn.0065ab44
add esp, 0x2c
pop edi
jmp 0x657fdd
lea eax, [ebp + 8]
lea esi, [esi + 0x65f3ac]
push 0
push eax
push dword [esi]
call fcn.00658d00
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

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

Disassembly:
pushal
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x40de38
mov ecx, 0x37ea10be
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x43304e
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
jne 0x433024
nop
nop
nop
nop
nop
mov eax, section..data
mov ebx, 0x4304d8
nop
nop
mov ecx, 0xf816fac
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x433084
nop
nop
nop
nop
xor dword [eax], ecx
nop
add eax, 4
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
jne 0x43306c
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
nop
nop
nop
nop
nop
pop eax
add eax, 0x403ac5
nop
nop
sub eax, 0x403a6b
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
jl 0x42e030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
nop
nop
jne 0x42e01e
nop
popal
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x401270
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
mov al, byte [edx]
mov byte [ebp - 1], al
add dword [ebp - 8], 1
cmp byte [ebp - 1], 0
jne 0x401287
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0x20
je 0x4012ac
xor eax, eax
jmp 0x4012e1
push 0x40
push 0x1000
push 0xc8
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
mov ecx, 0x32
mov esi, 0x404058
mov edi, dword [ebp - 0xc]
rep movsd dword es:[edi], dword [esi]
push 0x404018
mov edx, dword [ebp + 8]
push edx
call dword [ebp - 0xc]
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4012f0
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00401000
push str.Oh__its_another_ez_Reversing_Challenge
call dword [0x404490]
add esp, 4
push str.Leverage_all_you_learned_in_class_to_solve_this_one
call dword [0x404490]
add esp, 4
push str.2_step_to_get_the_flag:__n_n_n
call dword [0x404490]
add esp, 4
push str.First__give_me_the_seed:
call dword [0x404490]
add esp, 4
lea eax, [ebp - 0x2c]
push eax
push 0x4031e4
call dword [0x404484]
add esp, 8
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00401070
add esp, 4
push str._n_n_nOK_then_whats_the_flag__
call dword [0x404490]
add esp, 4
lea edx, [ebp - 0x28]
push edx
push 0x403204
call dword [0x404484]
add esp, 8
lea eax, [ebp - 0x28]
push eax
call fcn.00401270
add esp, 4
test eax, eax
je 0x40139b
push str.OH_yeah__you_got_the_flag_n_n_n
call dword [0x404490]
add esp, 4
jmp 0x4013b7
push str.Thats_not_right__go_back_to_review_the_slides_on_https:__edu_ctf.csie.org
call dword [0x404490]
add esp, 4
push str.Hint:_file_format__calling_convention__shellcode__stack_frame____n_n_n_n
call dword [0x404490]
add esp, 4
push str.pause
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013d5
mov esp, ebp
pop ebp
ret
Function at 0x402a48
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404910
test esi, esi
jne 0x402a7e
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404a00
jmp 0x402a9c
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040295c
mov edi, eax
test esi, esi
je 0x402a9c
cmp dword [ebx], 0
je 0x402a9c
dec esi
jmp 0x402a85
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x460008], 0x8088405
inc edx
mov dword [ebx + 0x460008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x403a38
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x460024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403ad0
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403ab0
xor eax, eax
push ebp
push 0x403aa9
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 0x403aec
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 0x403ab0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x460024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x460024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404794
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x462044], 0
je 0x4047f5
cmp word [0x462218], 0xd7b2
jne 0x4047bd
cmp dword [0x462220], 0
jbe 0x4047bd
mov eax, 0x462214
call dword [0x462230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x460074
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40481c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x460034], 0
jne 0x404811
push 0
push 0x46006c
push 0x460074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret