joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402490
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
mov eax, dword [0x423680]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x460], eax
mov eax, dword [ebp + 0x10]
push 0x208
mov dword [ebp - 0x464], eax
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00406780
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.Jimao
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
add esp, 0xc
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
cmp eax, 0xffffffff
je 0x402532
test eax, eax
je 0x402532
push eax
call edi
test byte [ebp - 0x45c], 0x10
jne 0x40253d
push 0
lea eax, [ebp - 0x20c]
push eax
call esi
test ebx, ebx
je 0x4025a4
push 0x41b374
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [ebp - 0x45c]
add esp, 0x18
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x402597
test eax, eax
je 0x402597
push eax
call edi
test byte [ebp - 0x45c], 0x10
jne 0x4025aa
push 0
lea eax, [ebp - 0x20c]
push eax
call esi
jmp 0x4025aa
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push str.log
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
add esp, 0xc
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x4025e8
test eax, eax
je 0x4025e8
push eax
call edi
test byte [ebp - 0x45c], 0x10
jne 0x4025f3
push 0
lea eax, [ebp - 0x20c]
push eax
call esi
push dword [ebp - 0x460]
lea eax, [ebp - 0x20c]
push eax
push str._s_s
push 0x103
push 0x104
push dword [ebp - 0x464]
call fcn.004034d0
mov ecx, dword [ebp - 4]
add esp, 0x18
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004056d3
mov esp, ebp
pop ebp
ret

Function at 0x402730
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x423680]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], 0
test edi, edi
je 0x40275a
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
xor esi, esi
nop dword [eax]
lea eax, [ebp - 8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x402791
cmp dword [ebp - 8], 0x103
jne 0x4027b8
test edi, edi
je 0x402783
push edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x64
jl 0x402760
mov eax, 1
pop esi
test ebx, ebx
je 0x4027a8
test eax, eax
je 0x4027a8
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004056d3
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x402796
Function at 0x402a00
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x423680]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [0x42302c], 0x10
jne 0x402bed
mov eax, dword [0x423028]
cmp eax, 0xffffffff
je 0x402a32
test eax, eax
jne 0x402bed
push 0x7d0
push dword [0x423030]
call fcn.00402700
add esp, 8
test eax, eax
je 0x402bed
mov ecx, 0x41b628
mov eax, 0x4233ba
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402a7d
test dx, dx
je 0x402a79
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402a7d
add eax, 4
add ecx, 4
test dx, dx
jne 0x402a57
xor eax, eax
jmp 0x402a82
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402bcb
push eax
push 0x23
push 0x4233ba
push eax
call fcn.004035c0
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00406780
push 0x4233ba
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00403440
push str.Jimao
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
lea eax, [ebp - 0x20c]
push 1
push eax
call fcn.00402630
add esp, 0x3c
test eax, eax
jne 0x402b02
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402bd8
push str.log
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
lea eax, [ebp - 0x20c]
push 1
push eax
call fcn.00402630
add esp, 0x14
test eax, eax
jne 0x402b43
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402bd8
push 0x41b374
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
push 0x4230ba
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
lea eax, [ebp - 0x20c]
push 0x2e
push eax
call fcn.004066d9
add esp, 0x20
test eax, eax
je 0x402b89
xor ecx, ecx
mov word [eax], cx
push str..log
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.004033a0
lea eax, [ebp - 0x20c]
push eax
call fcn.004028f0
add esp, 0x10
test eax, eax
je 0x402bd8
push 0x4233ba
push 0x104
push 0x4233ba
call fcn.00403440
add esp, 0xc
jmp 0x402bd8
push 0x4233ba
call fcn.004028f0
add esp, 4
push dword [0x423030]
call fcn.00402720
add esp, 4
or dword [0x42302c], 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004056d3
mov esp, ebp
pop ebp
ret
Function at 0x403d50
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x423680]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push 0xf8
push 0
push edi
call fcn.00406780
add esp, 0xc
test esi, esi
jne 0x403d87
push 0x57
jmp 0x403e11
push 0x1c
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0
push eax
xorps xmm0, xmm0
push esi
push ebx
movups xmmword [ebp - 0x20], xmm0
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x403e17
push 0
push 0x40
lea eax, [ebp - 0x60]
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403e17
mov eax, 0x5a4d
cmp word [ebp - 0x60], ax
jne 0x403e0c
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
ja 0x403e0c
cmp eax, 0x40
jb 0x403e0c
push 0
push 0xf8
push edi
add eax, esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403e17
cmp dword [edi], 0x4550
jne 0x403e0c
mov eax, dword [ebp - 0x24]
pop edi
add eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004056d3
mov esp, ebp
pop ebp
ret
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004056d3
mov esp, ebp
pop ebp
ret
Function at 0x406066
Capabilities:
Parse pe header

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

Function at 0x411556
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x423680]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4115a1
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004116f1
test al, al
jne 0x41159b
sub edx, 2
cmp edx, edi
jne 0x411581
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4115c3
lea eax, [edi + 2]
cmp edx, eax
je 0x4115c3
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004114a2
add esp, 0x10
jmp 0x4116bd
push esi
lea ecx, [ebp - 0x255]
call fcn.004116f1
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x411606
push dword [ebp - 0x25c]
jmp 0x4115b3
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x411643
cmp word [ebp - 0x226], 0
je 0x411664
cmp word [ebp - 0x226], ax
jne 0x411643
cmp word [ebp - 0x224], 0
je 0x411664
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004114a2
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4116b0
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x41161d
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x411698
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4116bd
push 0x4112d2
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00416dc0
add esp, 0x10
jmp 0x41168d
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004056d3
leave
ret

Function at 0x4121f9
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x41220a
pop esi
ret
push ebx
push edi
push esi
call fcn.004121c2
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0040f71b
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x412232
push ebx
push esi
push edi
call fcn.004068e0
add esp, 0xc
push 0
call fcn.0040f6e1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x412602
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00412247

Function at 0x413332
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41dfdc
push 0x41dfd4
push str.FlsAlloc
push 0x1f
call fcn.00413210
mov esi, eax
add esp, 0x10
test esi, esi
je 0x413366
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b1c4]
call esi
jmp 0x41336c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4133b0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41dfec
push 0x41dfe4
push str.FlsGetValue
push 0x21
call fcn.00413210
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4133e7
push dword [ebp + 8]
mov ecx, esi
call dword [0x41b1c4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4133ef
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41dff4
push 0x41dfec
push str.FlsSetValue
push 0x22
call fcn.00413210
mov esi, eax
add esp, 0x10
test esi, esi
je 0x413429
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41b1c4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4144ff
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 + 0x428bb0]
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 0x41453f
cmp byte [ebx], 0xa
jne 0x41453f
or byte [edi + eax + 0x28], 4
jmp 0x414544
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 0x414643
mov dl, byte [eax]
cmp dl, 0x1a
je 0x414626
inc eax
cmp dl, 0xd
je 0x414570
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x414596
cmp eax, ecx
jae 0x4145a4
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 0x414558
jmp 0x414643
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 0x414621
cmp dword [ebp - 0x10], 0
je 0x414621
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x428bb0]
test byte [eax + edi + 0x28], 0x48
je 0x4145fb
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4145e6
mov byte [esi], dl
jmp 0x4145f7
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x428bb0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x414643
cmp byte [ebp - 1], 0xa
jne 0x41460a
cmp esi, ebx
jne 0x41460a
mov byte [esi], 0xa
jmp 0x414642
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418849
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x414643
mov byte [esi], 0xd
jmp 0x414642
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x428bb0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x414640
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x414643
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41464c
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 + 0x428bb0]
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 0x414692
cmp word [ebx], dx
jne 0x414692
or byte [eax + edi + 0x28], 4
jmp 0x414697
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 0x4147fa
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 0x4147da
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4146d8
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41470e
cmp eax, edx
jae 0x41471c
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 0x4146b3
jmp 0x4147fa
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 0x4147d5
cmp dword [ebp - 0x18], 0
je 0x4147d5
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x428bb0]
test byte [eax + edi + 0x28], 0x48
je 0x4147ab
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 0x41476f
mov word [esi], cx
jmp 0x4147a6
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x428bb0]
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 + 0x428bb0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x428bb0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4147fa
pop eax
cmp word [ebp - 4], ax
jne 0x4147bb
cmp esi, ebx
jne 0x4147bb
mov word [esi], ax
jmp 0x4147f7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00418849
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4147fa
push 0xd
pop eax
jmp 0x4147b6
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x428bb0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4147f4
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4147fa
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 0x41a150
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41a17d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41a17d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x403408
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00405ac8
test esi, esi
jne 0x403440
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00405c04
jmp 0x40345e
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040334c
mov edi, eax
test esi, esi
je 0x40345e
cmp dword [ebx], 0
je 0x40345e
dec esi
jmp 0x403447
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403b74
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4d9024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403c0c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x403bec
xor eax, eax
push ebp
push 0x403be5
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 0x403c44
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403bec
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x4d9024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4d9024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404ae8
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push esi
push edi
mov ebx, 0x4e7aec
cmp dword [ebp + 0xc], 2
jl 0x404afc
mov ebx, 0x4e7b1c
mov esi, ebx
lea edi, [ebp - 0x40]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
pop dword [ebx + 0x20]
pop dword [ebx + 0x1c]
pop dword [ebx + 0x18]
mov dword [ebx + 0x14], ebp
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], edx
lea ecx, [ebp - 0x40]
mov dword [ebx], ecx
call sub.kernel32.dll_GetCurrentThreadId
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 8]
xor ecx, ecx
cmp dword [ebp + 0xc], 0
jne 0x404b34
mov ecx, dword [eax]
mov dword [ebx + 0xc], ecx
mov eax, 0x4012d0
mov dword [0x4e5014], eax
mov eax, 0x4012d8
mov dword [0x4e5018], eax
mov eax, ebx
call fcn.004049d4
mov eax, dword [ebp + 0xc]
inc eax
mov byte [ebx + 0x28], al
dec eax
pop ecx
mov edx, dword [ecx]
mov dword [ebx + 0x24], edx
je 0x404b69
cmp al, 3
jge 0x404b69
call dword [ecx + eax*4]
push ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x404b7a
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call ecx
pop ecx
mov eax, dword [ebp + 0xc]
cmp al, 3
jl 0x404b85
call dword [ecx + eax*4]
cmp dword [0x4e5038], 0
jne 0x404b9b
mov byte [0x4e5040], 1
fnstcw word [0x4d9024]
mov eax, dword [ebp + 0xc]
dec eax
jne fcn.00404e18
call fcn.00404a80
ret 4
Function at 0x404d88
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4e5054], 0
je 0x404de9
cmp word [0x4e5330], 0xd7b2
jne 0x404db1
cmp dword [0x4e5338], 0
jbe 0x404db1
mov eax, 0x4e532c
call dword [0x4e5348]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
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 0x404e14
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4d9030], 0
jne 0x404e05
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404fb4
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 [0x4d9034], 0
je 0x404fda
mov edx, esi
mov eax, ebx
call dword [0x4d9034]
jmp 0x404fe9
mov eax, 8
call fcn.00403064
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x4e5055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404f7c
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 0x408290
Capabilities:
Get system information on windows

Disassembly:
add esp, 0xffffffdc
push esp
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [esp + 0x14]
add esp, 0x24
ret

Function at 0x409dfc
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
mov esi, 0x4e7b64
push 0xa
push 0x409e90
mov eax, dword [0x4e7b50]
push eax
call sub.kernel32.dll_FindResourceW
mov ebx, eax
test ebx, ebx
jne 0x409e20
call fcn.00415214
push ebx
mov eax, dword [0x4e7b50]
push eax
call sub.kernel32.dll_LoadResource
mov ebx, eax
test ebx, ebx
jne 0x409e37
call fcn.00415214
push ebx
call sub.kernel32.dll_LockResource
mov dword [esi], eax
cmp dword [esi], 0
jne 0x409e49
call fcn.00415214
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, edx
add ecx, dword [eax]
mov dword [0x4e7b68], ecx
mov ecx, edx
add ecx, dword [eax + 4]
mov dword [0x4e7b6c], ecx
mov ecx, edx
add ecx, dword [eax + 8]
mov dword [0x4e7b70], ecx
mov ecx, edx
add ecx, dword [eax + 0xc]
mov dword [0x4e7b74], ecx
mov ecx, edx
add ecx, dword [eax + 0x10]
mov dword [0x4e7b78], ecx
add edx, dword [eax + 0x14]
mov dword [0x4e7b7c], edx
pop esi
pop ebx
ret

Function at 0x40b700
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x40b7a9
test eax, edx
je 0x40b7ac
push 0
push 0
cmp word [eax - 0xa], 2
je 0x40b729
push edx
mov edx, eax
mov eax, esp
call fcn.00405ce4
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x40b73f
push eax
lea eax, [esp + 8]
call fcn.00405ce4
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x40b74e
movzx eax, word [eax]
sub eax, ecx
jmp 0x40b775
push ebx
mov ebx, dword [eax - 4]
xor ecx, ecx
sub ebx, dword [edx - 4]
push ebx
adc ecx, 0xffffffff
and ecx, ebx
sub ecx, dword [eax - 4]
shl ecx, 1
sub eax, ecx
sub edx, ecx
mov ebx, dword [ecx + eax]
xor ebx, dword [ecx + edx]
jne 0x40b78f
add ecx, 4
js 0x40b766
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x40b78c
push eax
mov eax, ecx
mov edx, 2
call fcn.00405054
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x40b773
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x40b775
xor eax, eax
ret
test eax, eax
je 0x40b7bc
test edx, edx
jne 0x40b710
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

Function at 0x40c944
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.00405b54
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x40c962
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp ebx, 2
je 0x40c983
cmp ebx, 3
je 0x40c983
cmp ebx, 0x7b
je 0x40c983
mov eax, esi
call fcn.0040c904
test al, al
jne 0x40c987
xor eax, eax
jmp 0x40c989
mov al, 1
pop esi
pop ebx
ret

Function at 0x40c98c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00405b54
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x40c9a5
test al, 0x10
jne 0x40c9a9
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret