joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5eb784
Capabilities:
Packed with generic packer

Disassembly:
mov dword [esp], ebp
push word [esp + 2]
lea esp, [esp + 2]
jmp 0x5eb76e

Function at 0x402910
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
movsx ecx, byte [eax]
cmp ecx, 0x22
jne 0x402969
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x402953
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
cmp eax, 0x22
je 0x402953
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
jmp 0x402933
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
cmp eax, 0x22
jne 0x402967
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
jmp 0x40297f
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
cmp eax, 0x20
jle 0x40297f
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
jmp 0x402969
mov edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
test eax, eax
je 0x40299f
mov ecx, dword [ebp - 0x4c]
movsx edx, byte [ecx]
cmp edx, 0x20
jg 0x40299f
mov eax, dword [ebp - 0x4c]
add eax, 1
mov dword [ebp - 0x4c], eax
jmp 0x40297f
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402a40
push 0x404004
push section..data
call fcn.00402a10
add esp, 8
mov edx, dword [ebp - 0x1c]
and edx, 1
je 0x4029d8
movzx eax, word [ebp - 0x18]
mov dword [ebp - 0x54], eax
jmp 0x4029df
mov dword [ebp - 0x54], 0xa
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x50], eax
call fcn.00402ab0
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x401302
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40134d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401343
mov dword [ebp - 4], 1
jmp 0x40134d
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x40226c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [0x417bd8]
push ecx
call sub.WCDMI.dll_Ordinal_342
add esp, 8
mov dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp + 8]
mov dword [edx], eax
xor ecx, ecx
mov cl, byte [0x417b78]
test ecx, ecx
jne 0x4022b4
xor eax, eax
jmp 0x402452
cmp dword [ebp - 0x14], 0
jne 0x402447
mov edx, dword [ebp + 8]
mov dword [ebp - 0x94], edx
cmp dword [ebp - 0x94], 1
je 0x4022de
cmp dword [ebp - 0x94], 2
je 0x40233d
jmp 0x40243f
mov dword [ebp - 0x10], 0x417d20
push 0x40
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x413bf4
lea ecx, [ebp - 0x54]
push ecx
call fcn.00403760
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
lea eax, [ebp - 0x54]
push eax
call fcn.00403760
add esp, 8
mov ecx, dword [ebp - 0x6c]
mov dword [ecx + 8], 8
lea edx, [ebp - 0x14]
push edx
mov eax, dword [0x417bd8]
push eax
lea ecx, [ebp - 0x54]
push ecx
call sub.WCDMI.dll_Ordinal_332
add esp, 0xc
mov edx, dword [ebp - 0x6c]
mov dword [edx + 0x10], eax
jmp 0x40243f
mov dword [ebp - 0x10], 0x417d20
push 0x40
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x413bf8
lea ecx, [ebp - 0x54]
push ecx
call fcn.00403760
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
lea eax, [ebp - 0x54]
push eax
call fcn.00403760
add esp, 8
mov ecx, dword [ebp - 0x6c]
mov dword [ecx + 8], 8
push 0xffffffffffffffff
push 0
push 3
push 0
push 1
push 0x80000000
lea edx, [ebp - 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x60]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea ecx, [ebp - 0x58]
push ecx
lea edx, [ebp - 0x90]
push edx
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
mov ecx, dword [ebp - 0x90]
and ecx, 0xffff
and ecx, 0x1f
push ecx
mov edx, dword [ebp - 0x90]
and edx, 0xffff
and edx, 0x1e0
sar edx, 5
push edx
mov eax, dword [ebp - 0x90]
and eax, 0xffff
and eax, 0xfe00
sar eax, 9
add eax, 0x7bc
push eax
push str._d:_d:_d_n
lea ecx, [ebp - 0x8c]
push ecx
call fcn.00403840
add esp, 0x14
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [0x417bd8]
push ecx
lea edx, [ebp - 0x8c]
push edx
call sub.WCDMI.dll_Ordinal_332
add esp, 0xc
mov ecx, dword [ebp - 0x6c]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x6c]
mov dword [ecx], edx
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret
Function at 0x403a50
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411090
push 0x4072c4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa4
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x417898], eax
mov eax, dword [0x417898]
shr eax, 8
and eax, 0xff
mov dword [0x4178a4], eax
mov ecx, dword [0x417898]
and ecx, 0xff
mov dword [0x4178a0], ecx
mov edx, dword [0x4178a0]
shl edx, 8
add edx, dword [0x4178a4]
mov dword [0x41789c], edx
mov eax, dword [0x417898]
shr eax, 0x10
and eax, 0xffff
mov dword [0x417898], eax
call fcn.00407130
test eax, eax
jne 0x403adf
push 0x1c
call fcn.00403c80
add esp, 4
mov dword [ebp - 4], 0
call fcn.00406dc0
call fcn.00406db0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x419290], eax
call fcn.00406750
mov dword [0x417870], eax
cmp dword [0x417870], 0
je 0x403b17
cmp dword [0x419290], 0
jne 0x403b21
push 0xffffffffffffffff
call fcn.00405900
add esp, 4
call fcn.00405fd0
call fcn.00405e90
call fcn.004058c0
mov ecx, dword [0x419290]
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x64]
xor eax, eax
mov al, byte [edx]
cmp eax, 0x22
jne 0x403b9b
mov ecx, dword [ebp - 0x64]
add ecx, 1
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x64]
xor eax, eax
mov al, byte [edx]
cmp eax, 0x22
je 0x403b84
mov ecx, dword [ebp - 0x64]
xor edx, edx
mov dl, byte [ecx]
test edx, edx
je 0x403b84
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov cl, byte [eax]
push ecx
call fcn.00405da0
add esp, 4
test eax, eax
je 0x403b82
mov edx, dword [ebp - 0x64]
add edx, 1
mov dword [ebp - 0x64], edx
jmp 0x403b45
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0x22
jne 0x403b99
mov edx, dword [ebp - 0x64]
add edx, 1
mov dword [ebp - 0x64], edx
jmp 0x403bb2
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0x20
jle 0x403bb2
mov edx, dword [ebp - 0x64]
add edx, 1
mov dword [ebp - 0x64], edx
jmp 0x403b9b
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov cl, byte [eax]
test ecx, ecx
je 0x403bd4
mov edx, dword [ebp - 0x64]
xor eax, eax
mov al, byte [edx]
cmp eax, 0x20
jg 0x403bd4
mov ecx, dword [ebp - 0x64]
add ecx, 1
mov dword [ebp - 0x64], ecx
jmp 0x403bb2
mov dword [ebp - 0x30], 0
lea edx, [ebp - 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [ebp - 0x30]
and eax, 1
test eax, eax
je 0x403bfd
mov ecx, dword [ebp - 0x2c]
and ecx, 0xffff
mov dword [ebp - 0x6c], ecx
jmp 0x403c04
mov dword [ebp - 0x6c], 0xa
mov edx, dword [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x64]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call fcn.00401055
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
push ecx
call fcn.00405900
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x403c65
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4073f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b4
push ebx
push esi
push edi
mov dword [ebp - 8], 0
jmp 0x40740e
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x12
jae 0x407427
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx*8 + 0x414458]
jne 0x407425
jmp 0x407427
jmp 0x407405
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax*8 + 0x414458]
jne 0x4075da
cmp dword [ebp + 8], 0xfc
je 0x407464
mov edx, dword [ebp - 8]
mov eax, dword [edx*8 + 0x41445c]
push eax
push 0
push 0
push 0
push 1
call fcn.00404ee0
add esp, 0x14
cmp eax, 1
jne 0x407464
int3
cmp dword [0x417878], 1
je 0x40747f
cmp dword [0x417878], 0
jne 0x4074ea
cmp dword [0x413ff4], 1
jne 0x4074ea
cmp dword [0x417de0], 0
je 0x4074a5
mov ecx, dword [0x417de0]
cmp dword [ecx + 0x10], 0xffffffff
je 0x4074a5
mov edx, dword [0x417de0]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1b4], eax
jmp 0x4074b3
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x1b4], eax
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx*8 + 0x41445c]
push eax
call fcn.00403670
add esp, 4
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx*8 + 0x41445c]
push edx
mov eax, dword [ebp - 0x1b4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4075da
cmp dword [ebp + 8], 0xfc
je 0x4075da
push 0x104
lea ecx, [ebp - 0x110]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407523
push str._program_name_unknown_
lea edx, [ebp - 0x110]
push edx
call fcn.00403750
add esp, 8
lea eax, [ebp - 0x110]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00403670
add esp, 4
add eax, 1
cmp eax, 0x3c
jbe 0x40756c
lea edx, [ebp - 0x110]
push edx
call fcn.00403670
add esp, 4
mov ecx, dword [ebp - 0xc]
lea edx, [ecx + eax - 0x3b]
mov dword [ebp - 0xc], edx
push 3
push 0x411380
mov eax, dword [ebp - 0xc]
push eax
call fcn.00408660
add esp, 0xc
push str.Runtime_Error__n_nProgram:
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.00403750
add esp, 8
mov edx, dword [ebp - 0xc]
push edx
lea eax, [ebp - 0x1b0]
push eax
call fcn.00403760
add esp, 8
push 0x4112f4
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.00403760
add esp, 8
mov edx, dword [ebp - 8]
mov eax, dword [edx*8 + 0x41445c]
push eax
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.00403760
add esp, 8
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
lea edx, [ebp - 0x1b0]
push edx
call fcn.004085a0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401820
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0xb04]
test eax, eax
jne 0x4018f1
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0xb08], eax
jne 0x401872
push 0
push 0
push str.Socket
call sub.MFC42.DLL_AfxMessageBox
push str.Socket__
push str.CHttpSocket
push 0x14
call fcn.0040ab80
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ecx
ret
mov edi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [esp + 8]
push 4
push ecx
push 4
push 0xffff
push eax
mov dword [esp + 0x1c], 1
call edi
test eax, eax
jge 0x4018aa
push 0
push 0
push str.Socket_SO_REUSEADDR_
call sub.MFC42.DLL_AfxMessageBox
push 0x4100b0
jmp 0x4018d5
mov ecx, dword [esi + 0xb08]
lea eax, [esp + 8]
push 4
push eax
push 1
push 6
push ecx
call edi
test eax, eax
jge 0x4018f7
push 0
push 0
push str.Socket_TCP_NODELAY_
call sub.MFC42.DLL_AfxMessageBox
push 0x41005c
push str.CHttpSocket
push 0x14
call fcn.0040ab80
mov edx, dword [esi + 0xb08]
add esp, 0xc
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
xor eax, eax
pop esi
pop ecx
ret
pop edi
mov eax, 1
pop esi
pop ecx
ret

Function at 0x401900
Capabilities:
Connect socket
Resolve dns

Disassembly:
sub esp, 0x10
push esi
push edi
mov edi, dword [esp + 0x1c]
mov esi, ecx
test edi, edi
jne 0x40191a
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x10
ret 8
mov eax, dword [esi + 0xb04]
test eax, eax
je 0x401932
mov ecx, esi
call fcn.00401fa0
mov ecx, esi
call fcn.00401820
mov eax, dword [esp + 0x20]
push edi
mov dword [esi + 0xb00], eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
jne 0x401952
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x10
ret 8
mov ecx, dword [eax + 0xc]
xor eax, eax
push 0x50
mov edx, dword [ecx]
mov edi, dword [edx]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov word [esp + 0xc], 2
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call dword [sym.imp.WSOCK32.dll_htons]
mov edx, dword [esi + 0xb08]
lea ecx, [esp + 8]
push 0x10
push ecx
push edx
mov word [esp + 0x16], ax
mov dword [esp + 0x18], edi
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x4019a6
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x10
ret 8
mov dword [esi + 0xb04], 1
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8
Function at 0x401e40
Capabilities:
Send data
Send data on socket
Send http request

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x100
xor eax, eax
lea edi, [esi + 0x700]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0xb04]
xor edx, edx
or ecx, 0xffffffff
cmp eax, edx
mov dword [esi + 0xb10], edx
mov dword [esi + 0xb18], ecx
mov dword [esi + 0xb14], edx
je 0x401f50
mov ebx, dword [esp + 0x14]
cmp ebx, edx
jne 0x401e88
lea ebx, [esi + 0x300]
mov edi, dword [esp + 0x18]
cmp edi, edx
jne 0x401e9f
lea edi, [esi + 0x300]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov eax, dword [esi + 0xb08]
mov ebp, dword [sym.imp.WSOCK32.dll_send]
push edx
push edi
push ebx
push eax
call ebp
cmp eax, 0xffffffff
jne 0x401ecb
push 0
push 0
push str.SendRequest__send1
call sub.MFC42.DLL_AfxMessageBox
push str.SendRequest___send1
jmp 0x401f41
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.00402060
test eax, eax
jne 0x401f59
mov ecx, esi
call fcn.004023b0
test eax, eax
push 0
jge 0x401efb
push 0
push str.SendRequest__ConnectHost
call sub.MFC42.DLL_AfxMessageBox
push str.SendRequest___ConnectHost
jmp 0x401f41
mov edx, dword [esi + 0xb08]
push edi
push ebx
push edx
call ebp
cmp eax, 0xffffffff
jne 0x401f20
push 0
push 0
push str.SendRequest__send2
call sub.MFC42.DLL_AfxMessageBox
push str.SendRequest___send2
jmp 0x401f41
lea eax, [esp + 0x14]
mov ecx, esi
push eax
call fcn.00402060
test eax, eax
jne 0x401f59
push eax
push eax
push 0x410248
call sub.MFC42.DLL_AfxMessageBox
push str.SendRequest___GetResponseHeader
push str.CHttpSocket
push 0x14
call fcn.0040ab80
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 8

Function at 0x402000
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword [esp + 8]
lea edx, [esp + 4]
neg eax
sbb eax, eax
push 4
add eax, 0x1006
push edx
push eax
mov eax, dword [ecx + 0xb08]
push 0xffff
push eax
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
je 0x402052
push 0
push 0
push str.SetTimeout__setsockopt__
call sub.MFC42.DLL_AfxMessageBox
push str.SetTimeout___setsockopt__
push str.CHttpSocket
push 0x14
call fcn.0040ab80
add esp, 0xc
xor eax, eax
ret 8
mov eax, 1
ret 8
Function at 0x4022a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x40bbe8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 8]
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x10]
push eax
push 0x410444
push ecx
mov byte [esp + 0x30], 2
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea edx, [esp + 0x14]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push edx
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
mov dword [esp + 0x28], 0x50
call sub.MFC42.DLL_AfxParseURL
mov ecx, dword [esp + 0xc]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push ecx
lea edx, [esi + 8]
push 0x410444
push edx
call edi
mov eax, dword [esp + 0x14]
add esp, 0xc
lea ecx, [esi + 0x1fc]
push eax
push 0x410444
push ecx
call edi
mov edx, dword [esp + 0x20]
add esp, 0xc
and edx, 0xffff
lea ecx, [esp + 8]
mov dword [esi + 0xb00], edx
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
pop edi
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x20
ret 4
Function at 0x408910
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x40c34a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0040b3fc
xor edi, edi
mov eax, 0x40d6cc
mov dword [esp + 0x18], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], eax
mov dword [esi + 0x1c], edi
mov dword [esi + 0x18], eax
mov dword [esi + 0x24], edi
mov dword [esi + 0x20], eax
lea ecx, [esi + 0x34]
mov byte [esp + 0x18], 3
call fcn.0040b3fc
lea ecx, [esi + 0x44]
mov byte [esp + 0x18], 4
call fcn.0040b3fc
lea ebx, [esi + 0x74]
mov byte [esp + 0x18], 5
mov ecx, ebx
call sub.MFC42.DLL_CString::CString_1
push edi
mov byte [esp + 0x1c], 6
mov dword [esi], 0x40de2c
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
mov ecx, esi
call sub.MFC42.DLL_CDC::Attach
mov ecx, ebx
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], edi
call sub.MFC42.DLL_CString::Empty
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x78], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x40a540
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push eax
push ecx
push ebp
mov byte [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
jne 0x40a567
pop ebp
pop ebx
pop ecx
ret
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40a577
pop ebp
pop ebx
pop ecx
ret
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40a5dd
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40a5b0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [esp + 0x28]
mov byte [esp + 0x10], 1
pop edi
pop esi
mov dword [edx], eax
mov eax, dword [esp + 8]
pop ebp
and eax, 0xff
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x28]
push ebx
push ebp
mov esi, dword [eax]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp esi, eax
jl 0x40a5dd
mov ecx, esi
mov esi, edi
mov edi, dword [esp + 0x24]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov byte [esp + 0x10], 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
and eax, 0xff
pop ebx
pop ecx
ret
Function at 0x40a8c0
Capabilities:
Terminate process

Disassembly:
sub esp, 0x6c
mov eax, dword [str.prog]
mov cl, byte [0x410cb0]
mov dword [esp], eax
mov eax, dword [esp + 0x74]
test eax, eax
mov byte [esp + 4], cl
jne 0x40a8e2
lea eax, [esp]
test byte [0x410c28], 2
je 0x40a999
test byte [0x410c30], 1
je 0x40a945
push 0x410ca8
push eax
lea edx, [esp + 0x10]
push str._s._s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x18]
push 0x410c9c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x18
mov dword [0x410c68], eax
test eax, eax
jne 0x40a999
lea ecx, [esp + 8]
push ecx
push str.cant_create_log_file__file_name:_s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.MSVCRT.dll_exit]
push esi
mov esi, dword [esp + 0x74]
push 0x410ca8
mov edx, dword [esi]
push edx
push eax
lea eax, [esp + 0x18]
push str._s_d._s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x20]
push 0x410c9c
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x1c
mov dword [esi + 4], eax
test eax, eax
pop esi
jne 0x40a999
lea edx, [esp + 8]
push edx
push str.cant_create_log_file__file_name:_s_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.MSVCRT.dll_exit]
add esp, 0x6c
ret
Function at 0x402b20
Capabilities:
Query or enumerate registry value

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