joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403a50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov eax, dword [0x42104c]
xor eax, ebp
mov dword [ebp + 0x398], eax
push dword [ebp + 0x3a4]
mov dword [ebp - 0x80], ecx
call fcn.00403b7d
pop ecx
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x403b68
push ebx
push esi
push edi
mov esi, 0x206
push esi
push eax
mov word [ebp + 0x190], ax
lea eax, [ebp + 0x192]
push eax
call fcn.0040ae10
xor eax, eax
push esi
push eax
mov word [ebp - 0x78], ax
lea eax, [ebp - 0x76]
push eax
call fcn.0040ae10
lea edi, [ebp + 0x190]
call fcn.00403958
push 0x41cc9c
mov esi, 0x104
mov eax, edi
push esi
push eax
call fcn.00407d01
mov edi, 0x4231b8
add esp, 0x24
mov ebx, edi
cmp word [ebx], 0
je 0x403b00
lea eax, [ebp + 0x190]
push eax
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.0040842b
push ebx
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.00407d01
add esp, 0x18
add ebx, 0x118
cmp ebx, 0x423730
jl 0x403adb
cmp word [edi], 0
je 0x403b26
push dword [ebp + 0x3a4]
mov ecx, edi
push dword [ebp - 0x80]
call fcn.004042ff
pop ecx
pop ecx
add edi, 0x118
cmp edi, 0x423730
jl 0x403b0e
push 0x423db0
lea eax, [ebp + 0x190]
push esi
push eax
call fcn.00407d01
add esp, 0xc
lea eax, [ebp + 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
pop esi
pop ebx
cmp eax, 0xffffffff
jne 0x403b65
mov dword [ebp - 0x7c], 2
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp + 0x398]
xor ecx, ebp
call fcn.00407cf2
add ebp, 0x39c
leave
ret

Function at 0x403d54
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9ac
mov eax, dword [0x42104c]
xor eax, esp
mov dword [esp + 0x9a8], eax
push ebx
xor ebx, ebx
lea eax, [esp + 0x1a8]
cmp ecx, ebx
je 0x403d7e
mov eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0x18]
push eax
push 0x101
mov dword [esp + 0xc], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x403da2
xor eax, eax
jmp 0x403e28
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x403d9b
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x403dde
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
mov dword [esp + 8], eax
push 4
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
je 0x403e17
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push 2
mov dword [esp + 0x10], eax
pop eax
push dword [ebp + 8]
mov word [esp + 0xc], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0xa], ax
push 0x10
lea eax, [esp + 0xc]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x403e17
xor ebx, ebx
inc ebx
jmp 0x403e26
mov eax, dword [esi]
test eax, eax
je 0x403e26
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
and dword [esi], ebx
mov eax, ebx
mov ecx, dword [esp + 0x9ac]
pop ebx
xor ecx, esp
call fcn.00407cf2
mov esp, ebp
pop ebp
ret
Function at 0x403f67
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
mov dword [ebp - 8], ecx
cmp dword [eax], ecx
je 0x403fe4
push esi
mov esi, dword [ebp + 0x10]
cmp esi, ecx
push edi
jle 0x403f8e
mov eax, dword [ebp + 0xc]
add eax, ecx
not byte [eax]
inc ecx
cmp ecx, esi
jl 0x403f82
lea eax, [esi + 7]
push eax
mov dword [ebp - 4], eax
call fcn.00408d47
push dword [ebp + 0x10]
mov ebx, eax
push dword [ebp + 0xc]
add esi, 5
mov word [ebx], si
lea edi, [ebx + 2]
mov esi, 0x422074
movsd dword es:[edi], dword [esi]
lea eax, [ebx + 7]
push eax
movsb byte es:[edi], byte [esi]
call fcn.0040bb30
mov eax, dword [ebp + 8]
add esp, 0x10
push 0
push dword [ebp - 4]
push ebx
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
cmp eax, 0xffffffff
je 0x403fe7
cmp eax, dword [ebp - 4]
jne 0x403fe7
mov dword [ebp - 8], 1
jmp 0x403fe7
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x403ff2
push ebx
call fcn.004084fb
pop ecx
mov eax, dword [ebp - 8]
pop ebx
leave
ret

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

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x8e0
mov eax, dword [0x42104c]
xor eax, ebp
mov dword [ebp + 0x6c], eax
mov eax, dword [ebp + 0x7c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x78]
xor ebx, ebx
mov dword [ebp - 0x870], eax
mov dword [ebp - 0x86c], ecx
mov dword [ebp - 0x868], edi
lea eax, [ebp - 0x85c]
cmp edx, ebx
je 0x4041c9
mov eax, edx
xor edx, edx
mov word [eax], dx
mov esi, dword [ecx]
mov dword [ebp - 0x864], ebx
cmp esi, ebx
je 0x4042e7
cmp edi, ebx
je 0x4042e7
push 0xc7
lea eax, [ebp - 0x5b]
push ebx
push eax
mov byte [ebp - 0x5c], dl
call fcn.0040ae10
add esp, 0xc
push ebx
push 2
lea eax, [ebp - 0x5c]
push eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
call esi
cmp eax, 0xffffffff
je 0x4042e7
cmp eax, ebx
je 0x4042e7
movzx edi, word [ebp - 0x5c]
lea eax, [edi + 2]
push eax
call fcn.00408d47
pop ecx
mov dword [ebp - 0x860], eax
test edi, edi
jle 0x4042d2
push 0
mov eax, edi
sub eax, ebx
push eax
mov eax, dword [ebp - 0x860]
add eax, ebx
push eax
mov eax, dword [ebp - 0x86c]
push dword [eax]
call esi
cmp eax, 0xffffffff
je 0x4042b0
test eax, eax
je 0x4042b0
add ebx, eax
cmp edi, ebx
jg 0x404238
push 5
pop ecx
cmp ebx, ecx
jl 0x4042d2
mov edi, dword [ebp - 0x860]
sub ebx, ecx
mov esi, 0x422074
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4042d2
mov ecx, dword [ebp - 0x860]
test ebx, ebx
jle 0x404290
lea eax, [ecx + 5]
mov edx, ebx
not byte [eax]
inc eax
dec edx
jne 0x40428a
mov esi, dword [ebp - 0x870]
mov eax, dword [esi]
add ecx, 5
cmp eax, ebx
jl 0x4042b8
push ebx
push ecx
push dword [ebp - 0x868]
call fcn.0040bb30
mov dword [esi], ebx
jmp 0x4042c5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4042d2
push eax
push ecx
push dword [ebp - 0x868]
call fcn.0040bb30
add esp, 0xc
mov dword [ebp - 0x864], 1
cmp dword [ebp - 0x860], 0
je 0x4042e7
push dword [ebp - 0x860]
call fcn.004084fb
pop ecx
mov ecx, dword [ebp + 0x6c]
mov eax, dword [ebp - 0x864]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407cf2
add ebp, 0x70
leave
ret
Function at 0x404538
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0xf90]
mov eax, 0x1010
call fcn.00412780
mov eax, dword [0x42104c]
xor eax, ebp
mov dword [ebp + 0xf8c], eax
mov eax, dword [ebp + 0xf98]
push ebx
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
xor ebx, ebx
push ebx
mov dword [ebp - 0x7c], eax
push 4
lea eax, [ebp - 0x78]
push eax
push dword [edi]
call esi
cmp eax, 4
je 0x40457e
xor eax, eax
jmp 0x4045c6
cmp dword [ebp - 0x78], ebx
jbe 0x4045b5
push 0
push 0x1000
lea eax, [ebp - 0x74]
push eax
push dword [edi]
call esi
mov dword [ebp - 0x80], eax
test eax, eax
je 0x4045b5
mov ecx, dword [ebp - 0x7c]
push dword [ecx]
push eax
lea eax, [ebp - 0x74]
push 1
push eax
call fcn.004083a9
add ebx, dword [ebp - 0x80]
add esp, 0x10
cmp ebx, dword [ebp - 0x78]
jb 0x404583
mov eax, dword [ebp - 0x7c]
push dword [eax]
call fcn.004081cb
cmp ebx, dword [ebp - 0x78]
pop ecx
sbb eax, eax
inc eax
mov ecx, dword [ebp + 0xf8c]
pop esi
xor ecx, ebp
pop ebx
call fcn.00407cf2
add ebp, 0xf90
leave
ret

Function at 0x4045dd
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push edi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x41ce60
mov ebx, eax
push 0x81
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebp, eax
cmp ebp, edi
je 0x40464a
push esi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebp
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
mov eax, dword [esp + 0x14]
push esi
mov dword [eax], esi
call fcn.00408d47
push esi
mov edi, eax
push 0
push edi
call fcn.0040ae10
push esi
push ebp
push edi
call fcn.0040bb30
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop esi
mov eax, edi
pop edi
pop ebp
pop ebx
ret

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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
push edi
push dword [ebp + 8]
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40467d
push dword [ebp + 8]
call fcn.004046f3
pop ecx
cmp eax, dword [ebp + 0x10]
jne 0x40467d
inc ebx
jmp 0x4046ea
mov edi, 0x200000
push edi
call fcn.00409149
pop ecx
mov esi, eax
push esi
push dword [ebp + 0x10]
mov dword [esp + 0x18], edi
push dword [ebp + 0xc]
lea edi, [esp + 0x1c]
call fcn.00404748
add esp, 0xc
test eax, eax
je 0x4046e3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00408dac
pop ecx
call fcn.004030b7
mov edi, dword [esp + 0x10]
push eax
lea ebx, [edi + esi]
mov dword [esp + 0x18], eax
call fcn.0040318f
add edi, dword [esp + 0x18]
pop ecx
push edi
push esi
push dword [ebp + 8]
call fcn.004047b6
add esp, 0xc
mov ebx, eax
dec ebx
neg ebx
sbb ebx, ebx
inc ebx
push esi
call fcn.004096bc
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4046f3
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor eax, eax
push eax
push eax
push 3
push eax
push 3
push connect
push dword [ebp + 8]
or esi, 0xffffffff
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, esi
jne 0x404722
mov edx, esi
jmp 0x404741
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x404738
mov esi, dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x4047b6
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4047d6
mov eax, dword [ebp + 8]
call fcn.00404821
test eax, eax
je 0x40481c
push edi
push esi
push esi
push 2
push esi
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40481b
push esi
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jne 0x404814
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebp
ret

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

Disassembly:
push esi
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404834
xor eax, eax
pop esi
ret
test al, 1
je 0x40483b
xor eax, 1
test al, 4
je 0x404842
xor eax, 4
test al, 2
je 0x404849
xor eax, 2
test al, 0x20
je 0x404850
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, esi
pop esi
ret
Function at 0x40603f
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push edi
mov edi, edx
test ecx, ecx
jne 0x40604a
xor eax, eax
pop edi
ret
push esi
not eax
mov edx, 0xff
cmp edi, 8
jb 0x4060fc
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x41e608]
inc ecx
sub edi, 8
dec esi
jne 0x406061
pop ebx
test edi, edi
je 0x406115
movzx esi, byte [ecx]
xor esi, eax
and esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x41e608]
inc ecx
dec edi
jne 0x406100
pop esi
not eax
pop edi
ret

Function at 0x40611a
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x41e608]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x41e608]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x40678f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x4067bf
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4067ba
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x4067e7
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x4067d0
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0040bb30
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret
Function at 0x407497
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [ebx], 0
push esi
push edi
jne 0x40753d
cmp dword [ebx + 4], 0xffffffff
jne 0x40753d
lea esi, [ebx + 0x244]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4074c4
sub eax, edx
sar eax, 1
movzx eax, word [ebx + eax*2 + 0x242]
cmp ax, 0x5c
je 0x4074fb
cmp ax, 0x2f
je 0x4074fb
dec esi
dec esi
mov ax, word [esi + 2]
inc esi
inc esi
test ax, ax
jne 0x4074e8
mov edi, esi
mov esi, 0x41cc9c
movsd dword es:[edi], dword [esi]
push 0x20
call fcn.00408d47
and dword [eax + 0x1c], 0
and dword [eax + 0xc], 0
pop ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x14], ecx
mov ecx, dword [esp + 0x14]
push eax
mov byte [eax], 0
mov byte [eax + 1], 1
mov byte [eax + 0x10], 0
mov dword [eax + 0x18], ecx
call fcn.00406a08
mov dword [ebx], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x407542
mov eax, 0x1000000
pop edi
pop esi
pop ecx
ret 8

Function at 0x407cf2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42104c]
jne 0x407cfc
repz ret
jmp fcn.00409a1d

Function at 0x412cc0
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.0040d83c
and dword [ebp - 4], 0
cmp dword [0x422ef0], 0
mov ebx, eax
jne 0x412d71
push 0x41bbc0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x412e22
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41bbb4
push edi
call esi
test eax, eax
je 0x412e22
push eax
call fcn.0040d7ca
mov dword [esp], 0x41bba4
push edi
mov dword [0x422ef0], eax
call esi
push eax
call fcn.0040d7ca
mov dword [esp], 0x41bb90
push edi
mov dword [0x422ef4], eax
call esi
push eax
call fcn.0040d7ca
mov dword [esp], 0x41bb74
push edi
mov dword [0x422ef8], eax
call esi
push eax
call fcn.0040d7ca
pop ecx
mov dword [0x422f00], eax
test eax, eax
je 0x412d71
push 0x41bb5c
push edi
call esi
push eax
call fcn.0040d7ca
pop ecx
mov dword [0x422efc], eax
mov eax, dword [0x422efc]
cmp eax, ebx
je 0x412dc9
cmp dword [0x422f00], ebx
je 0x412dc9
push eax
call fcn.0040d845
push dword [0x422f00]
mov esi, eax
call fcn.0040d845
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x412dc9
test edi, edi
je 0x412dc9
call esi
test eax, eax
je 0x412dc0
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x412dc0
test byte [ebp - 0xc], 1
jne 0x412dc9
or dword [ebp + 0x10], 0x200000
jmp 0x412e02
mov eax, dword [0x422ef4]
cmp eax, ebx
je 0x412e02
push eax
call fcn.0040d845
pop ecx
test eax, eax
je 0x412e02
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x412e02
mov eax, dword [0x422ef8]
cmp eax, ebx
je 0x412e02
push eax
call fcn.0040d845
pop ecx
test eax, eax
je 0x412e02
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x422ef0]
call fcn.0040d845
pop ecx
test eax, eax
je 0x412e22
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x412e24
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012c6
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x40283c
call fcn.004025a0
sub esp, 0xc
push str.Tenio_Initialize_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp + 8], 0
je 0x401314
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
jbe 0x401314
lea ecx, [ebp - 0x18]
call fcn.00401704
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
and dword [ebp - 4], 0
mov eax, dword [ecx]
call dword [eax + 0x38]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00401747
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 4

Function at 0x401322
Capabilities:
Enumerate process modules
Print debug messages

Disassembly:
mov eax, 0x402850
call fcn.004025a0
sub esp, 0x230
push ebx
push esi
lea ecx, [ebp - 0x18]
call fcn.00401704
xor esi, esi
push esi
push 8
mov dword [ebp - 4], esi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401402
cmp dword [ebp - 0x14], esi
je 0x401402
push edi
mov ecx, 0x88
xor eax, eax
lea edi, [ebp - 0x238]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], 0x224
push eax
push ebx
call sub.KERNEL32.dll_Module32First
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
pop edi
test eax, eax
je 0x4013b3
push str.TenioDllFreeMap
push dword [ebp - 0x220]
call esi
test eax, eax
je 0x4013a2
call eax
lea eax, [ebp - 0x23c]
push eax
push ebx
call sub.KERNEL32.dll_Module32Next
test eax, eax
jne 0x40138f
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
call dword [eax + 0x2c]
mov ecx, dword [ebp - 0x14]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
lea eax, [ebp - 0x23c]
push eax
push ebx
call sub.KERNEL32.dll_Module32First
test eax, eax
je 0x4013fb
push str.TenioSetDllSafe
push dword [ebp - 0x220]
call esi
test eax, eax
je 0x4013ec
push 0
call eax
pop ecx
lea eax, [ebp - 0x23c]
push eax
push ebx
call sub.KERNEL32.dll_Module32Next
jmp 0x4013d2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Tenio_Uninitialize_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00401747
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x401427
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
and dword [ebp - 0x12c], 0
push esi
push edi
push 0x49
pop ecx
xor eax, eax
lea edi, [ebp - 0x128]
push eax
rep stosd dword es:[edi], eax
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
lea eax, [ebp - 0x12c]
push eax
push esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x12c], 0x128
call sub.KERNEL32.dll_Process32First
lea eax, [ebp - 0x12c]
push eax
push esi
call sub.KERNEL32.dll_Process32Next
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4014dc
lea eax, [ebp - 0x108]
push str.QQGameDl.exe
push eax
call dword [sym.imp.MSVCRT.dll__mbsicmp]
pop ecx
test eax, eax
pop ecx
je 0x4014ac
lea eax, [ebp - 0x12c]
push eax
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x401481
jmp 0x4014dc
push dword [ebp - 0x124]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4014dc
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4014d9
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call edi
push dword [ebp - 4]
call edi
pop edi
pop esi
leave
ret 4

Function at 0x401518
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x402864
call fcn.004025a0
sub esp, 0x14
push esi
push edi
mov esi, ecx
call fcn.004027ae
push eax
push 1
push str.CatchException
push str.QQGame
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
neg eax
sbb eax, eax
neg eax
mov dword [esi + 4], eax
je 0x4015ae
call fcn.004022e4
mov edi, eax
mov ecx, edi
call fcn.004021a2
test al, al
je 0x4015ae
lea eax, [ebp - 0x20]
push str.HelpDll.dll
push eax
mov ecx, edi
call fcn.004021d8
and dword [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.004021cb
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [esi + 0xc], eax
je 0x4015a2
push str.QQExceptionFilter
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4015a2
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [esi + 0x14], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00402199
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret

Function at 0x40187f
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
and byte [ebp - 0x400], 0
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x3ff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x400]
push dword [ebp + 0xc]
push 0x3ff
push 0x400
push eax
call dword [0x404010]
add esp, 0x14
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
leave
ret
Function at 0x4018d3
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x504
push ebx
push esi
push edi
mov esi, ecx
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x103]
mov byte [ebp - 0x104], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x503]
mov byte [ebp - 0x504], bl
rep stosd dword es:[edi], eax
push dword [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x504]
push 0x400
push eax
push ebx
push 0x404244
push 0x404240
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x104]
push 0x104
push eax
lea eax, [ebp - 0x504]
push eax
mov ecx, esi
call fcn.00401de7
lea eax, [ebp - 0x104]
test eax, eax
je 0x4019a7
lea eax, [ebp - 0x104]
push 0x3a
push eax
call dword [sym.imp.MSVCRT.dll__mbschr]
pop ecx
test eax, eax
pop ecx
jne 0x401973
cmp byte [ebp - 0x104], 0x5c
jne 0x4019a7
cmp dword [ebp + 0xc], ebx
je 0x4019be
cmp dword [ebp + 0x10], ebx
jle 0x4019be
lea eax, [ebp - 0x104]
push eax
call sub.MSVCRT.dll_strlen
cmp eax, dword [ebp + 0x10]
pop ecx
jae 0x4019be
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [0x40401c]
add esp, 0xc
jmp 0x4019be
push dword [ebp + 0x10]
lea eax, [ebp - 0x104]
mov ecx, esi
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.00401a7c
pop edi
pop esi
pop ebx
leave
ret 0xc