joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407f8e
Capabilities:
Create thread
Delete file

Disassembly:
push 0x14
mov eax, 0x41439e
call fcn.0041297c
mov edi, dword [ecx]
mov esi, dword [edi]
cmp esi, edi
je 0x40808e
mov eax, dword [ebp + 8]
mov ecx, eax
and ecx, 1
and eax, 2
mov dword [ebp - 0x10], ecx
mov dword [ebp + 8], eax
lea ebx, [esi + 8]
push ebx
lea ecx, [ebp - 0x20]
call fcn.00407484
and dword [ebp - 4], 0
lea eax, [ebx + 8]
push eax
lea ecx, [ebp - 0x18]
call fcn.00407484
cmp dword [ebp - 0x10], 0
je 0x407ff7
cmp dword [ebp + 0xc], 0
jne 0x407fe9
mov ecx, dword [ebp - 0x20]
call fcn.004083c9
jmp 0x407ff7
cmp dword [ebp + 0xc], 1
jne 0x407ff7
mov ecx, dword [ebp - 0x20]
call fcn.00408458
cmp dword [ebp + 8], 0
je 0x408068
cmp dword [ebp + 0xc], 0
jne 0x408023
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0xc], eax
xor eax, eax
push eax
push eax
push ebx
push 0x403bb1
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x18], eax
jmp 0x408068
cmp dword [ebp + 0xc], 1
jne 0x408056
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x408068
call fcn.00408458
push 0xffffffffffffffff
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebx + 0x18], 0
and dword [ebx + 0xc], 0
jmp 0x408068
cmp dword [ebp + 0xc], 2
jne 0x408068
mov eax, dword [ebp - 0x18]
push dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x408074
call fcn.00403b7e
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x408084
call fcn.00403b7e
mov esi, dword [esi]
cmp esi, edi
jne 0x407fb7
call fcn.0041294f
ret 8

Function at 0x40809b
Capabilities:
Delete directory

Disassembly:
mov edi, edi
push ecx
push esi
push edi
push 2
push 2
mov esi, ecx
xor edi, edi
call fcn.00407f8e
cmp dword [esi + 0x34], edi
je 0x4080d4
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4080d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x4080d4
movzx edi, di
or edi, 0x80070000
mov eax, edi
pop edi
pop esi
pop ecx
ret
Function at 0x408910
Capabilities:
Accept command line arguments

Disassembly:
push 0xac
push 0x414b88
call fcn.0040abc8
mov dword [ebp - 0xb0], 0x94
lea eax, [ebp - 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x408734
mov eax, 0xff
jmp 0x40888c
mov esi, dword [ebp - 0xa4]
and esi, 0x7fff
mov edi, dword [ebp - 0xa0]
cmp edi, 2
je 0x408751
or esi, 0x8000
mov edx, dword [ebp - 0xac]
mov ecx, edx
shl ecx, 8
mov eax, dword [ebp - 0xa8]
add ecx, eax
mov dword [0x417518], edi
mov dword [0x417520], ecx
mov dword [0x417524], edx
mov dword [0x417528], eax
mov dword [0x41751c], esi
call fcn.00408897
mov edi, eax
mov dword [ebp - 0xb8], edi
push 1
call fcn.0040a3b2
pop ecx
test eax, eax
jne 0x4087a2
push 0x1c
call fcn.004088e2
pop ecx
call fcn.00409c8b
test eax, eax
jne 0x4087b3
push 0x10
call fcn.004088e2
pop ecx
and dword [ebp - 4], 0
call fcn.0040a3e7
test eax, eax
jns 0x4087c8
push 0x1b
call fcn.00409f1b
pop ecx
call sub.KERNEL32.dll_GetCommandLineW
mov dword [0x418ec0], eax
call fcn.0040ab56
mov dword [0x4171d0], eax
call fcn.0040a69c
test eax, eax
jns 0x4087ed
push 8
call fcn.00409f1b
pop ecx
call fcn.0040a972
test eax, eax
jns 0x4087fe
push 9
call fcn.00409f1b
pop ecx
push 1
call fcn.00409f71
pop ecx
test eax, eax
je 0x408811
push eax
call fcn.00409f1b
pop ecx
mov eax, dword [0x417510]
mov dword [0x417534], eax
push eax
push dword [0x41750c]
push dword [0x417508]
call main
add esp, 0xc
mov esi, eax
mov dword [ebp - 0xb4], esi
test edi, edi
jne 0x408842
push esi
call fcn.0040a1ee
call fcn.00409f5d
jmp 0x408883
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
call fcn.0040ac10
ret
call fcn.0040aaaf
jmp 0x408700
Function at 0x40a247
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
mov esi, ebx
cmp edi, dword [esi*8 + 0x401258]
je 0x40a266
inc esi
cmp esi, 0x17
jb 0x40a257
cmp esi, 0x17
jae 0x40a3a6
push 3
call fcn.0040e891
pop ecx
cmp eax, 1
je 0x40a370
push 3
call fcn.0040e891
pop ecx
test eax, eax
jne 0x40a299
cmp dword [section..data], 1
je 0x40a370
cmp edi, 0xfc
je 0x40a3a6
push 0x401868
push 0x314
mov edi, 0x417540
push edi
call fcn.0040adcf
add esp, 0xc
test eax, eax
je 0x40a2ce
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ba68
add esp, 0x14
push 0x104
push 0x417559
push ebx
mov byte [0x41765d], bl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40a311
push 0x401884
push 0x2fb
push 0x417559
call fcn.0040adcf
add esp, 0xc
test eax, eax
je 0x40a311
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ba68
add esp, 0x14
push 0x40189c
push 0x314
push edi
call fcn.0040e811
add esp, 0xc
test eax, eax
je 0x40a335
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ba68
add esp, 0x14
push dword [esi*8 + 0x40125c]
push 0x314
push edi
call fcn.0040e811
add esp, 0xc
test eax, eax
je 0x40a35b
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ba68
add esp, 0x14
push 0x12010
push 0x4018a0
push edi
call fcn.0040e8e2
add esp, 0xc
jmp 0x40a3a6
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, eax
test edx, edx
je 0x40a3a6
cmp edx, 0xffffffff
je 0x40a3a6
mov esi, dword [esi*8 + 0x40125c]
mov ecx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a38f
push ebx
lea eax, [ebp - 4]
sub ecx, edi
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40ab56
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x40abb0
push ebx
xor ebx, ebx
push esi
mov esi, edi
cmp word [edi], bx
je 0x40ab84
add esi, 2
cmp word [esi], bx
jne 0x40ab74
add esi, 2
cmp word [esi], bx
jne 0x40ab74
sub esi, edi
add esi, 2
push esi
call fcn.004094bf
mov dword [ebp - 4], eax
pop ecx
test eax, eax
je 0x40aba5
push esi
push edi
push eax
call fcn.0040cea0
mov ebx, dword [ebp - 4]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
pop esi
mov eax, ebx
pop ebx
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x40e3c0
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40e3fe
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x40e3f6
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x40e400
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x40e3e6
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x40e4e0
Capabilities:
Parse pe header

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

Function at 0x40e8e2
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x416040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x18], eax
call fcn.004099af
xor esi, esi
mov ebx, eax
cmp dword [0x417c08], esi
jne 0x40e9c2
push esi
push esi
push 0x401920
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
je 0x40ea73
push 0x40192c
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40ea73
push eax
call fcn.00409945
mov dword [esp], 0x401938
push edi
mov dword [0x417c08], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call fcn.00409945
mov dword [esp], 0x401948
push edi
mov dword [0x417c0c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call fcn.00409945
mov dword [esp], 0x40195c
push edi
mov dword [0x417c10], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call fcn.00409945
pop ecx
mov ecx, eax
mov dword [0x417c18], ecx
test ecx, ecx
je 0x40e9bb
push 0x401978
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call fcn.00409945
pop ecx
mov dword [0x417c14], eax
jmp 0x40e9c7
mov eax, dword [0x417c14]
jmp 0x40e9cd
mov eax, dword [0x417c14]
mov ecx, dword [0x417c18]
cmp eax, ebx
je 0x40ea20
cmp ecx, ebx
je 0x40ea20
push eax
call fcn.004098db
push dword [0x417c18]
mov dword [ebp - 0x1c], eax
call fcn.004098db
mov edi, eax
mov eax, dword [ebp - 0x1c]
pop ecx
pop ecx
test eax, eax
je 0x40ea20
test edi, edi
je 0x40ea20
call eax
test eax, eax
je 0x40ea17
lea ecx, [ebp - 0x20]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40ea17
test byte [ebp - 8], 1
jne 0x40ea20
or dword [ebp + 0x10], 0x200000
jmp 0x40ea55
mov eax, dword [0x417c0c]
cmp eax, ebx
je 0x40ea55
push eax
call fcn.004098db
pop ecx
test eax, eax
je 0x40ea55
call eax
mov esi, eax
test esi, esi
je 0x40ea55
mov eax, dword [0x417c10]
cmp eax, ebx
je 0x40ea55
push eax
call fcn.004098db
pop ecx
test eax, eax
je 0x40ea55
push esi
call eax
mov esi, eax
push dword [0x417c08]
call fcn.004098db
pop ecx
test eax, eax
je 0x40ea73
push dword [ebp + 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push esi
call eax
jmp 0x40ea75
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408929
mov esp, ebp
pop ebp
ret
Function at 0x410d33
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x416040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 4
xor esi, esi
pop eax
mov dword [ebp - 0xc], esi
call fcn.004120c0
mov eax, esp
lea ecx, [ebp - 0x34]
push 0x1c
push ecx
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x410e3c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ebx, dword [ebp - 0x54]
push 0x401200
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x410dbd
push 0x402554
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x410dbd
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], esi
push ecx
call eax
cmp eax, 1
jne 0x410dbd
cmp dword [ebp - 0xc], esi
jbe 0x410dbd
mov esi, dword [ebp - 0xc]
mov dword [ebp - 8], esi
lea eax, [ebp - 8]
push eax
lea edi, [ebx - 1]
push edi
push esi
call fcn.0040a643
add esp, 0xc
test eax, eax
js 0x410e3c
mov esi, dword [ebp - 8]
not edi
and esi, edi
mov dword [ebp - 8], esi
je 0x410df3
lea eax, [ebp - 8]
push eax
push ebx
push esi
call fcn.0040a643
add esp, 0xc
test eax, eax
js 0x410e3c
mov esi, dword [ebp - 8]
lea eax, [ebx + ebx]
cmp esi, eax
jae 0x410dfc
mov esi, eax
mov eax, dword [ebp - 0x10]
lea edi, [ebx - 1]
not edi
add eax, ebx
and edi, dword [ebp - 0x14]
sub edi, esi
cmp edi, eax
jb 0x410e3c
push 4
push 0x1000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x410e3c
lea ecx, [ebp - 0x18]
push ecx
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x410e3c
xor eax, eax
inc eax
jmp 0x410e3e
xor eax, eax
lea esp, [ebp - 0x64]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408929
mov esp, ebp
pop ebp
ret
Function at 0x430005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43000c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x403daa
sub eax, 0x403d50
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x430030
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43001e
nop
nop
popal
nop
nop
nop
jmp loc.00401219
Function at 0x4033d8
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.00405df4
test esi, esi
jne 0x403410
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.00405f30
jmp 0x40342e
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040331c
mov edi, eax
test esi, esi
je 0x40342e
cmp dword [ebx], 0
je 0x40342e
dec esi
jmp 0x403417
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403b20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4ff024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403bb8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x403b98
xor eax, eax
push ebp
push 0x403b91
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 0x403bf0
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 0x403b98
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x4ff024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4ff024], ax
mov esp, ebp
pop ebp
ret
Function at 0x4043a0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00404654
mov byte [esp], al
cmp byte [esp], 0
jne 0x404529
test edi, edi
je 0x404529
mov byte [esp + 1], 0
test ebp, ebp
jle 0x404460
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
test ebp, ebp
jle 0x40443b
cmp edi, 0xffffffff
je 0x4043ff
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4043ff
mov byte [esp], 0
jmp 0x404529
mov ebx, dword [esi]
cmp ebx, 1
jg 0x40443b
test ebx, ebx
jne 0x404434
mov eax, esi
xor ecx, ecx
mov edx, 1
call fcn.004013f0
test eax, eax
jne 0x404434
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x404529
pause
dec ebp
test ebp, ebp
jg 0x4043e4
cmp edi, 0xffffffff
je 0x404460
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x40445e
mov byte [esp], 0
jmp 0x404529
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x4043ae
lea edx, [ebx + 2]
mov eax, esi
mov ecx, ebx
call fcn.004013f0
cmp ebx, eax
jne 0x404460
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.0040459c
mov edx, eax
mov ebx, dword [0x50b8cc]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x4044c7
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x4044c5
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x4044c7
xor edi, edi
cmp byte [esp], 0
je 0x4044f0
mov ebx, dword [esi]
test bl, 1
jne 0x404509
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, esi
mov ecx, ebx
call fcn.004013f0
cmp ebx, eax
jne 0x4044cd
mov byte [esp + 1], 1
jmp 0x404509
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, esi
mov ecx, ebx
call fcn.004013f0
cmp ebx, eax
jne 0x4044f0
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x40447a
cmp byte [esp], 0
je 0x404529
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x404f50
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push esi
push edi
mov ebx, 0x50daec
cmp dword [ebp + 0xc], 2
jl 0x404f64
mov ebx, 0x50db1c
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 0x404f9c
mov ecx, dword [eax]
mov dword [ebx + 0xc], ecx
mov eax, 0x4012a8
mov dword [0x50b014], eax
mov eax, 0x4012b0
mov dword [0x50b018], eax
mov eax, ebx
call fcn.00404e3c
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 0x404fd1
cmp al, 3
jge 0x404fd1
call dword [ecx + eax*4]
push ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x404fe2
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call ecx
pop ecx
mov eax, dword [ebp + 0xc]
cmp al, 3
jl 0x404fed
call dword [ecx + eax*4]
cmp dword [0x50b038], 0
jne 0x405003
mov byte [0x50b040], 1
fnstcw word [0x4ff024]
mov eax, dword [ebp + 0xc]
dec eax
jne fcn.00405280
call fcn.00404ee8
ret 4

Function at 0x4051f0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x50b054], 0
je 0x405251
cmp word [0x50b330], 0xd7b2
jne 0x405219
cmp dword [0x50b338], 0
jbe 0x405219
mov eax, 0x50b32c
call dword [0x50b348]
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 0x40527c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4ff030], 0
jne 0x40526d
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x40541c
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 [0x4ff034], 0
je 0x405442
mov edx, esi
mov eax, ebx
call dword [0x4ff034]
jmp 0x405451
mov eax, 8
call fcn.00403064
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x50b055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x4053e4
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 0x406904
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffbe4
mov esi, edx
mov ebx, eax
test bl, bl
je 0x406946
movzx eax, bl
add ax, 0x41
dec eax
mov word [esp], ax
mov word [esp + 2], 0x3a
mov word [esp + 4], 0
lea eax, [esp + 0x212]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
push esp
call sub.kernel32.dll_SetCurrentDirectoryW
lea eax, [esp + 8]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
test bl, bl
je 0x406966
lea eax, [esp + 0x212]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
mov eax, esi
lea edx, [esp + 8]
mov ecx, 0x105
call fcn.00405ff4
add esp, 0x41c
pop esi
pop ebx
ret
Function at 0x408700
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 0x40a55c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
mov esi, 0x50db64
push 0xa
push 0x40a5f0
mov eax, dword [0x50db50]
push eax
call sub.kernel32.dll_FindResourceW
mov ebx, eax
test ebx, ebx
jne 0x40a580
call fcn.00415d18
push ebx
mov eax, dword [0x50db50]
push eax
call sub.kernel32.dll_LoadResource
mov ebx, eax
test ebx, ebx
jne 0x40a597
call fcn.00415d18
push ebx
call sub.kernel32.dll_LockResource
mov dword [esi], eax
cmp dword [esi], 0
jne 0x40a5a9
call fcn.00415d18
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, edx
add ecx, dword [eax]
mov dword [0x50db68], ecx
mov ecx, edx
add ecx, dword [eax + 4]
mov dword [0x50db6c], ecx
mov ecx, edx
add ecx, dword [eax + 8]
mov dword [0x50db70], ecx
mov ecx, edx
add ecx, dword [eax + 0xc]
mov dword [0x50db74], ecx
mov ecx, edx
add ecx, dword [eax + 0x10]
mov dword [0x50db78], ecx
add edx, dword [eax + 0x14]
mov dword [0x50db7c], edx
pop esi
pop ebx
ret

Function at 0x40c24c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x40c2f5
test eax, edx
je 0x40c2f8
push 0
push 0
cmp word [eax - 0xa], 2
je 0x40c275
push edx
mov edx, eax
mov eax, esp
call fcn.00406010
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x40c28b
push eax
lea eax, [esp + 8]
call fcn.00406010
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x40c29a
movzx eax, word [eax]
sub eax, ecx
jmp 0x40c2c1
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 0x40c2db
add ecx, 4
js 0x40c2b2
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x40c2d8
push eax
mov eax, ecx
mov edx, 2
call fcn.004054bc
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x40c2bf
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x40c2c1
xor eax, eax
ret
test eax, eax
je 0x40c308
test edx, edx
jne 0x40c25c
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

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

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.00405e80
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x40d4be
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp ebx, 2
je 0x40d4df
cmp ebx, 3
je 0x40d4df
cmp ebx, 0x7b
je 0x40d4df
mov eax, esi
call fcn.0040d460
test al, al
jne 0x40d4e3
xor eax, eax
jmp 0x40d4e5
mov al, 1
pop esi
pop ebx
ret

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

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