joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402a20
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408028
push 0x404b70
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x409904], eax
xor eax, eax
mov al, byte [0x409905]
mov dword [0x409910], eax
mov eax, dword [0x409904]
shr dword [0x409904], 0x10
and eax, 0xff
mov dword [0x40990c], eax
shl eax, 8
add eax, dword [0x409910]
mov dword [0x409908], eax
call fcn.00404b50
mov dword [ebp - 4], 0
call fcn.00404970
call fcn.00404960
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40bbe8], eax
call fcn.00404500
mov dword [0x40967c], eax
test eax, eax
je 0x402ab9
cmp dword [0x40bbe8], 0
jne 0x402ac3
push 0xffffffffffffffff
call fcn.00403de0
add esp, 4
call fcn.00404280
call fcn.004041a0
call fcn.00403db0
mov esi, dword [0x40bbe8]
mov al, byte [esi]
cmp al, 0x22
je 0x402aea
cmp al, 0x20
jbe 0x402b17
inc esi
cmp byte [esi], 0x20
ja 0x402ae2
jmp 0x402b17
inc esi
cmp byte [esi], 0x22
je 0x402b16
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x402b11
xor eax, eax
mov al, bl
push eax
call fcn.00404140
add esp, 4
test eax, eax
je 0x402b0b
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x402af3
cmp byte [esi], 0x22
jne 0x402b17
inc esi
cmp byte [esi], 0
je 0x402b27
cmp byte [esi], 0x20
ja 0x402b27
inc esi
cmp byte [esi], 0
jne 0x402b1c
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x402b4b
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.00403de0
jmp 0x402b8c
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403e20
Capabilities:
Terminate process

Disassembly:
mov dword [0x40993c], 1
cmp dword [esp + 8], 0
push ebx
push esi
mov ebx, dword [esp + 0x14]
mov byte [0x409938], bl
jne 0x403e7c
cmp dword [0x40bbe4], 0
je 0x403e6a
mov esi, dword [0x40bbe0]
sub esi, 4
cmp esi, dword [0x40bbe4]
jb 0x403e6a
mov eax, dword [esi]
test eax, eax
je 0x403e5f
call eax
sub esi, 4
cmp esi, dword [0x40bbe4]
jae 0x403e57
push 0x40901c
push 0x409014
call fcn.00403ea0
add esp, 8
push 0x409024
push 0x409020
call fcn.00403ea0
add esp, 8
test ebx, ebx
jne 0x403e9d
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
ret
Function at 0x404500
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x4099e0], 0
push ebx
push esi
push edi
push ebp
jne 0x404550
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
call esi
mov edi, eax
test edi, edi
je 0x40452e
mov dword [0x4099e0], 1
mov ebx, dword [esp + 0x10]
jmp 0x40455e
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x404546
mov dword [0x4099e0], 2
jmp 0x40455e
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x4099e0], 1
jne 0x40460d
test edi, edi
jne 0x404581
call esi
mov edi, eax
test edi, edi
jne 0x404581
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40459b
add esi, 2
cmp word [esi], 0
jne 0x404589
add esi, 2
cmp word [esi], 0
jne 0x404589
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x4045fc
push ebp
call fcn.00405a20
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4045fc
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4045eb
push ebx
call fcn.00405a00
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4099e0], 2
jne 0x404691
test ebx, ebx
jne 0x404630
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x404630
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x404645
inc ebp
cmp byte [ebp], 0
jne 0x404637
inc ebp
cmp byte [ebp], 0
jne 0x404637
sub ebp, ebx
inc ebp
push ebp
call fcn.00405a20
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40466a
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x404c90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor eax, eax
mov ecx, 0x409e70
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [ecx], edx
je 0x404cb8
add ecx, 8
inc eax
cmp ecx, 0x409ef8
jb 0x404ca8
cmp dword [eax*8 + 0x409e70], edx
lea ebx, [eax*8]
jne 0x404e73
cmp dword [0x409688], 1
je 0x404e38
cmp dword [0x409688], 0
jne 0x404cef
cmp dword [0x40968c], 1
je 0x404e38
cmp edx, 0xfc
je 0x404e73
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x404d2c
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x404d70
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x409f44
push ebp
call fcn.00405b40
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
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]
mov edi, 0x409f24
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
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]
mov edi, dword [ebx + 0x409e74]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00405aa0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40bae0]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x404e4f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x409e74]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x4072a0
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x40bad4], edx
push ebx
push esi
push edi
push ebp
jbe 0x4074a7
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x40bae0
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x4074a7
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x407309
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x40731a
push 2
push 0
push edx
call fcn.004076e0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x4073b6
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x430]
mov eax, edi
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x4073ef
lea ebx, [esp + 0x24]
mov eax, edi
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40737d
mov al, byte [edi]
inc edi
cmp al, 0xa
jne 0x40736b
mov byte [ebx], 0xd
inc esi
inc ebx
mov byte [ebx], al
inc ebx
mov eax, ebx
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x407352
lea eax, [esp + 0x24]
push 0
sub ebx, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push ebx
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4073e5
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, ebx
jge 0x40733d
jmp 0x4073ef
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4073e5
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x4073ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x407496
cmp dword [esp + 0x10], 0
je 0x407448
cmp dword [esp + 0x10], 5
jne 0x40742b
mov dword [0x4098f8], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x4098fc], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.00407670
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x407472
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x407472
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4098f8], 0x1c
mov dword [0x4098fc], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4098f8], 9
mov dword [0x4098fc], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x40242f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0x32
xor edi, edi
pop ebx
push edi
push edi
push edi
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov esi, eax
cmp esi, edi
je 0x4024ba
push edi
push edi
push esi
push 0x40454b
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 8], eax
push 1
dec ebx
call fcn.00404f7a
pop ecx
test eax, eax
je 0x40247e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebx, edi
jne 0x402463
jmp 0x402485
mov dword [ebp - 4], 1
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [ebp - 8]
push 0xffffffffffffffff
push ebx
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4024aa
lea eax, [ebp - 0xc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp ebx, edi
je 0x4024ba
push ebx
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4024c2
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0x14
call fcn.00409041
pop ecx
xor ecx, ecx
cmp eax, ecx
je 0x402500
mov edx, dword [ebp + 0x14]
push ecx
mov dword [eax + 8], edx
mov edx, dword [ebp + 0xc]
push ecx
mov dword [eax], edx
mov edx, dword [ebp + 0x10]
push eax
push dword [ebp + 8]
mov dword [eax + 4], edx
mov edx, dword [ebp + 0x18]
mov dword [eax + 0xc], edx
mov edx, dword [ebp + 0x1c]
push ecx
push ecx
mov dword [eax + 0x10], edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40271b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor edi, edi
mov esi, 0x20a
push esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call fcn.00409041
mov ebx, eax
push esi
mov dword [ebp - 0x14], ebx
call fcn.00409041
mov esi, eax
pop ecx
pop ecx
mov dword [ebp - 0x18], esi
cmp esi, edi
je 0x402836
cmp ebx, edi
je 0x402844
push ebx
call fcn.00405b20
pop ecx
test eax, eax
je 0x402836
push dword [ebp + 8]
push 0x40a208
push ebx
push 3
push 0x104
push esi
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x402836
push edi
push edi
push 3
push edi
push edi
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x402836
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push edi
push edi
push eax
call ebx
mov esi, eax
push esi
call fcn.00409041
mov dword [ebp - 4], eax
lea eax, [esi + esi + 2]
push eax
call fcn.00409041
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 4], edi
je 0x40282d
cmp eax, edi
je 0x40282d
push edi
push edi
push edi
push dword [ebp - 0xc]
call ebx
test eax, eax
jne 0x40282d
push edi
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 4]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40282d
cmp dword [ebp - 0x10], esi
jne 0x40282d
mov ebx, dword [ebp - 8]
push esi
push ebx
push esi
push dword [ebp - 4]
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push dword [ebp + 0xc]
xor ecx, ecx
push ebx
mov word [ebx + eax*2], cx
call fcn.00402504
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], edi
je 0x402844
push dword [ebp - 0x14]
call fcn.004090a1
pop ecx
cmp dword [ebp - 0x18], edi
je 0x402852
push dword [ebp - 0x18]
call fcn.004090a1
pop ecx
cmp dword [ebp - 4], edi
je 0x402860
push dword [ebp - 4]
call fcn.004090a1
pop ecx
cmp dword [ebp - 8], edi
pop edi
pop esi
pop ebx
je 0x402871
push dword [ebp - 8]
call fcn.004090a1
pop ecx
mov eax, dword [ebp - 0x1c]
leave
ret
Function at 0x403848
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.004090c6
cmp dword [esi + 0x1c], 0xffffffff
mov edi, eax
pop ecx
mov dword [ebp - 8], edi
je 0x403887
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.004090c6
pop ecx
push eax
push dword [ebp + 8]
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov dword [ebp - 4], eax
cmp dword [esi + 0x18], 0xffffffff
je 0x4038d3
lea eax, [edi + edi + 2]
push eax
call fcn.00409041
mov edi, eax
pop ecx
cmp edi, ebx
je 0x4038d3
push ebx
push ebx
push dword [ebp - 8]
push edi
push dword [ebp - 8]
push dword [ebp + 8]
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
lea ecx, [ebp - 0xc]
push ecx
push eax
push edi
mov byte [eax + edi], bl
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
and dword [ebp - 4], eax
push edi
call fcn.004090a1
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret

Function at 0x403969
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4039b1
push esi
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4039aa
xor eax, eax
cmp dword [ebp - 4], ebx
sete al
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
leave
ret

Function at 0x403a18
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [esi]
push ebx
push edi
lea eax, [eax + eax + 2]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0x20119
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
xor edi, edi
push dword [ebp + 8]
inc edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403a7f
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x403a86
cmp eax, 0xea
je 0x403a86
mov dword [ebp - 4], ebx
mov dword [esi], ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret
mov eax, dword [ebp - 8]
shr eax, 1
dec eax
mov dword [ebp - 4], edi
mov dword [esi], eax
jmp 0x403a76

Function at 0x403a93
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
add eax, eax
push eax
push dword [ebp + 0xc]
push 1
push 0
push dword [ebp + 8]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [edi]
neg eax
sbb esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi + 1]
pop esi
pop ebp
ret
Function at 0x403b33
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, eax
lea eax, [esi + esi + 2]
push edi
push eax
call fcn.00409041
pop ecx
push 0
push 0x28
mov dword [ebp - 4], eax
call fcn.00406347
mov edi, eax
mov eax, dword [ebp - 4]
push edi
push 0x403abe
push esi
push dword [ebp + 8]
call fcn.00405ec2
push edi
mov ebx, eax
call fcn.004039da
add esp, 0x1c
mov edi, ebx
test ebx, ebx
je 0x403ba3
inc esi
push esi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
cmp edi, esi
jbe 0x403b8f
xor edi, edi
test edi, edi
jne 0x403ba2
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0040927d
pop ecx
pop ecx
jmp 0x403ba3
dec edi
push dword [ebp - 4]
call fcn.004090a1
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403cbd
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push esi
push esi
push esi
push 1
push 0x40a3c0
mov dword [ebp - 4], esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xc], eax
cmp eax, esi
je 0x403d45
push ebx
push esi
push esi
push dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x403d3f
push edi
push esi
push esi
push esi
push esi
push dword [ebp + 0xc]
push str.POST
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
cmp edi, esi
je 0x403d39
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x403d36
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 4], eax
push edi
call ebx
push dword [ebp - 8]
call ebx
pop edi
push dword [ebp - 0xc]
call ebx
pop ebx
mov eax, dword [ebp - 4]
pop esi
leave
ret

Function at 0x403e39
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
and dword [ebp - 4], esi
cmp al, 6
jae 0x403e52
inc esi
jmp 0x403e99
lea eax, [ebp - 4]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403e8a
push 4
pop eax
lea ecx, [ebp - 8]
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0x14
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x403e8a
mov esi, dword [ebp - 0xc]
cmp dword [ebp - 4], 0
je 0x403e99
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
leave
ret
Function at 0x403e9e
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push 0x38
lea eax, [ebp - 0x38]
push 0
push eax
call fcn.00408fa9
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
add esp, 0xc
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x38], 0x100
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
leave
ret

Function at 0x404428
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
push ebx
push esi
lea eax, [ebp - 0x1c]
xor ebx, ebx
push eax
push 8
mov dword [ebp - 0x18], ebx
xor esi, esi
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov word [ebp - 0xc], 0x500
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40452b
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
push 2
push dword [ebp - 0x1c]
call edi
push dword [ebp - 4]
call fcn.00409041
pop ecx
mov esi, eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 2
push dword [ebp - 0x1c]
call edi
test eax, eax
je 0x40452a
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40452a
xor edi, edi
cmp dword [esi], ebx
jbe 0x40452a
lea eax, [esi + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push dword [eax]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4044e6
add dword [ebp - 0x14], 8
inc edi
cmp edi, dword [esi]
jb 0x4044c9
jmp 0x40452a
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x438]
push eax
mov dword [ebp - 4], 0x104
push dword [esi + edi*8 + 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
jne 0x404523
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x534
jne 0x40452a
mov dword [ebp - 0x18], 1
pop edi
cmp dword [ebp - 8], ebx
je 0x404539
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp esi, ebx
je 0x404544
push esi
call fcn.004090a1
pop ecx
mov eax, dword [ebp - 0x18]
pop esi
pop ebx
leave
ret