joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41156a
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 + 0x427970]
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 0x4115b0
cmp word [ebx], dx
jne 0x4115b0
or byte [eax + edi + 0x28], 4
jmp 0x4115b5
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 0x411718
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 0x4116f8
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4115f6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41162c
cmp eax, edx
jae 0x41163a
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 0x4115d1
jmp 0x411718
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 0x4116f3
cmp dword [ebp - 0x18], 0
je 0x4116f3
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x427970]
test byte [eax + edi + 0x28], 0x48
je 0x4116c9
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 0x41168d
mov word [esi], cx
jmp 0x4116c4
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x427970]
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 + 0x427970]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x427970]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x411718
pop eax
cmp word [ebp - 4], ax
jne 0x4116d9
cmp esi, ebx
jne 0x4116d9
mov word [esi], ax
jmp 0x411715
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00411fa3
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x411718
push 0xd
pop eax
jmp 0x4116d4
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x427970]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x411712
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x411718
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 0x4153be
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 0x41545b
push ebx
push esi
call fcn.00415387
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.00414079
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x415408
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41545a
push edi
push eax
call fcn.00412184
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x415428
call fcn.0040f128
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x415459
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00414079
add esp, 0x20
test eax, eax
jne 0x415447
push edi
call fcn.0040f128
jmp 0x41544f
push ebx
call fcn.0040f128
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 0x417a88
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0040ede0
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x417af7
cmp esi, dword [ebp - 4]
je 0x417af2
cmp dword [ebp + 0xc], 0
je 0x417af2
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x417acf
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.004175da
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x417af9
xor eax, eax
inc eax
jmp 0x417af9
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x417b5e
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x426040]
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.0040ede0
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.0040ede0
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 0x417bd5
cmp word [ecx], dx
je 0x417bd5
mov eax, dword [0x41f964]
push edi
dec eax
push eax
push 0x41f850
call fcn.00417afd
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x417c48
cmp word [eax], dx
je 0x417c48
mov eax, dword [edi]
test eax, eax
je 0x417bf9
cmp word [eax], dx
je 0x417bf9
lea eax, [ebp - 0x10]
push eax
call fcn.004174e0
jmp 0x417c02
lea eax, [ebp - 0x10]
push eax
call fcn.0041757b
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x417c72
mov eax, dword [0x41f84c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x41f540
call fcn.00417afd
add esp, 0xc
test al, al
je 0x417c72
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x417c3d
cmp word [eax], di
je 0x417c3d
lea eax, [ebp - 0x10]
push eax
call fcn.004174e0
pop ecx
jmp 0x417c74
lea eax, [ebp - 0x10]
push eax
call fcn.0041757b
jmp 0x417c3a
mov eax, dword [edi]
test eax, eax
je 0x417c5f
cmp word [eax], dx
je 0x417c5f
lea eax, [ebp - 0x10]
push eax
call fcn.00417495
pop ecx
jmp 0x417c72
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 0x417d3d
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.00417982
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x417d3d
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x417d3d
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x417d3d
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x417cca
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0040f799
test ebx, ebx
je 0x417d38
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0040f799
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x417d3d
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 0x417d3d
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004193d7
add esp, 0x10
xor eax, eax
inc eax
jmp 0x417d3f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004048c1
leave
ret
Function at 0x41b010
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41b03d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41b03d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x438caa
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x438a14
dec ecx
add edi, edi
call fcn.00438ce2
mov ecx, edi
sub edi, ecx
xor dword [eax], edx
sub edi, 1
inc eax
add ecx, edi
cmp eax, ebx
jne fcn.00438caa
and edi, ecx
or ecx, edi
and edi, edi
ret

Function at 0x7d8058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.007d81a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x7d807e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d806a
add dl, dl
jne 0x7d8089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d80dc
xor eax, eax
add dl, dl
jne 0x7d8096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x7d817d
add dl, dl
jne 0x7d80a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x7d80d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x7d8075
mov eax, 1
add dl, dl
jne 0x7d80ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x7d80f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d80e1
sub eax, ebx
mov ebx, 1
jne 0x7d8128
mov ecx, 1
add dl, dl
jne 0x7d810e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x7d8119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d8105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x7d813f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x7d814a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x7d8136
cmp eax, 0x7d00
jae 0x7d816d
cmp eax, 0x500
jb 0x7d8168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
cmp eax, 0x7f
ja 0x7d8170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x7d8075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x7d819e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x7d8075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x5cf1776a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x5cf29928]
jne 0x5cf17774
repz ret
jmp fcn.5cf1ac7c

Function at 0x5cf1d107
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x5cf2a238]
je 0x5cf1d122
inc edi
cmp edi, 0x17
jb 0x5cf1d113
cmp edi, 0x17
jae 0x5cf1d2a2
push ebp
push 3
call fcn.5cf20c25
cmp eax, 1
pop ecx
je 0x5cf1d26e
push 3
call fcn.5cf20c25
test eax, eax
pop ecx
jne 0x5cf1d156
cmp dword [0x5cf29940], 1
je 0x5cf1d26e
cmp ebx, 0xfc
je 0x5cf1d2a1
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x5cf2afe8
push ebp
call fcn.5cf1867b
add esp, 0xc
test eax, eax
je 0x5cf1d18c
push esi
push esi
push esi
push esi
push esi
call fcn.5cf17a36
add esp, 0x14
push 0x104
mov esi, 0x5cf2b001
push esi
push 0
mov byte [0x5cf2b105], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x5cf1d1d0
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.5cf1867b
add esp, 0xc
test eax, eax
je 0x5cf1d1d0
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.5cf17a36
add esp, 0x14
push esi
call fcn.5cf185f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x5cf1d215
push esi
call fcn.5cf185f0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x5cf2b2fc
push 0x5cf25ffc
sub ecx, eax
push ecx
push eax
call fcn.5cf1ecfb
add esp, 0x14
test eax, eax
je 0x5cf1d215
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.5cf17a36
add esp, 0x14
jmp 0x5cf1d217
xor esi, esi
push 0x5cf25ff8
push ebx
push ebp
call fcn.5cf2003c
add esp, 0xc
test eax, eax
je 0x5cf1d237
push esi
push esi
push esi
push esi
push esi
call fcn.5cf17a36
add esp, 0x14
push dword [edi*8 + 0x5cf2a23c]
push ebx
push ebp
call fcn.5cf2003c
add esp, 0xc
test eax, eax
je 0x5cf1d259
push esi
push esi
push esi
push esi
push esi
call fcn.5cf17a36
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.5cf20a68
add esp, 0xc
jmp 0x5cf1d2a1
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x5cf1d2a1
cmp ebp, 0xffffffff
je 0x5cf1d2a1
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x5cf2a23c]
push dword [esi]
call fcn.5cf185f0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x5cf20a68
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.5cf1b917
xor ebx, ebx
cmp dword [0x5cf2b5e0], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x5cf20b3e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x5cf20c1e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x5cf20c1e
push eax
call fcn.5cf1b8a9
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x5cf2b5e0], eax
call esi
push eax
call fcn.5cf1b8a9
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x5cf2b5e4], eax
call esi
push eax
call fcn.5cf1b8a9
mov dword [0x5cf2b5e8], eax
lea eax, [ebp - 0xc]
push eax
call fcn.5cf1ce94
test eax, eax
pop ecx
pop ecx
je 0x5cf20b0c
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.5cf17a36
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x5cf20b3e
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.5cf1b8a9
cmp eax, ebx
pop ecx
mov dword [0x5cf2b5f0], eax
je 0x5cf20b3e
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.5cf1b8a9
pop ecx
mov dword [0x5cf2b5ec], eax
mov eax, dword [0x5cf2b5ec]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x5cf20bc3
cmp dword [0x5cf2b5f0], ecx
je 0x5cf20bc3
push eax
call fcn.5cf1b920
push dword [0x5cf2b5f0]
mov esi, eax
call fcn.5cf1b920
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x5cf20bc3
cmp edi, ebx
je 0x5cf20bc3
call esi
cmp eax, ebx
je 0x5cf20b90
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x5cf20b90
test byte [ebp - 0x18], 1
jne 0x5cf20bc3
lea eax, [ebp - 0x10]
push eax
call fcn.5cf1cecb
test eax, eax
pop ecx
je 0x5cf20bab
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.5cf17a36
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x5cf20bba
or dword [ebp + 0x10], 0x200000
jmp 0x5cf20bfe
or dword [ebp + 0x10], 0x40000
jmp 0x5cf20bfe
mov eax, dword [0x5cf2b5e4]
cmp eax, dword [ebp - 8]
je 0x5cf20bfe
push eax
call fcn.5cf1b920
cmp eax, ebx
pop ecx
je 0x5cf20bfe
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x5cf20bfe
mov eax, dword [0x5cf2b5e8]
cmp eax, dword [ebp - 8]
je 0x5cf20bfe
push eax
call fcn.5cf1b920
cmp eax, ebx
pop ecx
je 0x5cf20bfe
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5cf2b5e0]
call fcn.5cf1b920
cmp eax, ebx
pop ecx
je 0x5cf20c1e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x5cf20c20
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4032b0
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x4032ec
movzx eax, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x40330c
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.0040529c
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x4035a4
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.0040502c
test esi, esi
jne 0x4035da
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.0040511c
jmp 0x4035f8
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403448
mov edi, eax
test esi, esi
je 0x4035f8
cmp dword [ebx], 0
je 0x4035f8
dec esi
jmp 0x4035e1
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403e0c
Capabilities:
Query or enumerate registry value

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

Function at 0x404dd8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x57c04c], 0
je 0x404e39
cmp word [0x57c220], 0xd7b2
jne 0x404e01
cmp dword [0x57c228], 0
jbe 0x404e01
mov eax, 0x57c21c
call dword [0x57c238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
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 0x404e60
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x571030], 0
jne 0x404e55
push 0
push 0x57175c
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x404fb0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x571034], 0
je 0x404fd6
mov edx, esi
mov eax, ebx
call dword [0x571034]
jmp 0x404fe5
mov eax, 8
call fcn.0040309c
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x57c04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404f78
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x40d9c0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
xor edx, edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40db1b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x40db2c
call fcn.0040dc00
push eax
call sub.kernel32.dll_GetProcAddress_1
mov ebx, eax
push 0x40db3c
call fcn.0040dc00
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x40da8b
cmp dword [ebp - 0x10], 0
je 0x40da8b
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 8]
call fcn.0040d988
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
call fcn.00405a08
mov eax, dword [ebp - 0x18]
call fcn.00405a18
push eax
call ebx
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40da8b
xor eax, eax
push ebp
push 0x40da84
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x400
push 0
mov eax, dword [ebp - 8]
call fcn.0040550c
push eax
call sub.kernel32.dll_LoadLibraryExA_1
mov dword [ebp - 0xc], eax
call fcn.00404a30
jmp 0x40daf0
lea edx, [ebp - 4]
xor eax, eax
call fcn.004032b0
xor eax, eax
push ebp
push 0x40dae9
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 8]
call fcn.0040d988
mov eax, dword [ebp - 0x20]
call fcn.0040550c
push eax
call sub.kernel32.dll_SetCurrentDirectoryA_1
mov eax, dword [ebp - 8]
call fcn.0040550c
push eax
call sub.kernel32.dll_LoadLibraryA
mov dword [ebp - 0xc], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40daf0
mov eax, dword [ebp - 4]
call fcn.0040550c
push eax
call sub.kernel32.dll_SetCurrentDirectoryA_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40db22
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00405050
lea eax, [ebp - 0x18]
call fcn.00405854
lea eax, [ebp - 4]
call fcn.0040502c
ret

Function at 0x40e89c
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, eax
mov eax, esi
call fcn.0040550c
mov edi, eax
push edi
call sub.kernel32.dll_GetFileAttributesA
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e8c4
and ebx, 0xfffffff8
push ebx
push edi
call sub.kernel32.dll_SetFileAttributesA
push edi
call sub.kernel32.dll_DeleteFileA
cmp eax, 1
sbb eax, eax
inc eax
pop edi
pop esi
pop ebx
pop ebp
ret