joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402720
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
sub esp, 0x40
push ebx
push esi
push edi
test ecx, ecx
jle 0x402748
mov eax, dword [ebp + 0x10]
lea edx, [ebp + 0x18]
dec ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0xc], eax
jmp 0x402756
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
test ecx, ecx
jle 0x40276f
dec ecx
add edx, 8
mov dword [ebp + 0xc], ecx
mov eax, dword [edx - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [edx - 4]
mov dword [ebp - 0x14], eax
jmp 0x40277d
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
test ecx, ecx
jle 0x402796
dec ecx
add edx, 8
mov dword [ebp + 0xc], ecx
mov eax, dword [edx - 8]
mov dword [ebp - 0x20], eax
mov eax, dword [edx - 4]
mov dword [ebp - 0x1c], eax
jmp 0x4027a4
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
test ecx, ecx
jle 0x4027bd
dec ecx
add edx, 8
mov dword [ebp + 0xc], ecx
mov eax, dword [edx - 8]
mov dword [ebp - 0x28], eax
mov eax, dword [edx - 4]
mov dword [ebp - 0x24], eax
jmp 0x4027cb
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov eax, edx
mov dword [ebp - 0x30], 0
cdq
mov dword [ebp - 0x40], eax
mov eax, ecx
mov dword [ebp - 0x3c], edx
cdq
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov word [ebp - 8], fs
mov eax, 0x2b
mov fs, ax
mov dword [ebp - 4], esp
and esp, 0xfffffff0
push 0x33
call 0x402812
add dword [esp], 5
retf

Function at 0x4029b0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [0x7f2758]
sub esp, 0x11c
test eax, eax
jne 0x402aae
push ebx
push esi
push edi
push 0x100
push eax
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 word [esp + 0x2c], ax
lea eax, [esp + 0x30]
push eax
call fcn.00402ac0
add esp, 0xc
xor edi, edi
xor eax, eax
lea ebx, [ebx]
mov byte [esp + eax + 0x28], al
inc eax
cmp eax, 0x100
jb 0x402a00
xor esi, esi
mov edi, edi
mov dl, byte [esp + esi + 0x28]
mov eax, esi
and eax, 3
movzx ecx, dl
movzx eax, byte [eax + 0x41e100]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [esp + edi + 0x28]
mov byte [esp + esi + 0x28], al
inc esi
mov byte [esp + edi + 0x28], dl
cmp esi, 0x100
jb 0x402a10
xor edi, edi
xor ebx, ebx
xor esi, esi
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [esp + edi + 0x28]
movzx edx, cl
lea eax, [edx + ebx]
movzx ebx, al
movzx eax, byte [esp + ebx + 0x28]
mov byte [esp + edi + 0x28], al
mov byte [esp + ebx + 0x28], cl
movzx eax, byte [esp + edi + 0x28]
add eax, edx
movzx eax, al
movzx eax, byte [esp + eax + 0x28]
xor al, byte [esi + 0x41e104]
mov byte [esp + esi + 0xc], al
inc esi
cmp esi, 0x1a
jb 0x402a45
xor edx, edx
lea ecx, [esp + 0xc]
call fcn.00401d90
pop edi
pop esi
pop ebx
test eax, eax
je 0x402aa9
mov eax, dword [eax + 0x18]
test eax, eax
je 0x402aa9
mov dword [0x7f2758], eax
add esp, 0x11c
ret
mov eax, dword [0x7f2758]
add esp, 0x11c
ret
Function at 0x403060
Capabilities:
Check os version

Disassembly:
mov ecx, 1
mov edx, 0x7f1d48
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x403189
cmp dword fs:[0xc0], eax
je 0x40308b
mov dword [0x7f1d44], 1
mov eax, dword fs:[0x18]
push ebx
push esi
mov ebx, 1
mov esi, dword [eax + 0x30]
mov eax, dword [esi + 0xa4]
mov dword [0x7f1c2c], eax
mov eax, dword [esi + 0xa8]
mov dword [0x7f1c30], eax
movzx edx, word [esi + 0xac]
mov dword [0x7f1c34], edx
mov eax, dword [esi + 0xb0]
mov dword [0x7f1c38], eax
mov eax, dword [esi + 0x1f4]
test eax, eax
je 0x4030eb
push 0x7f
push eax
push 0x7f1c3c
call fcn.00402270
mov edx, dword [0x7f1c34]
add esp, 0xc
jmp 0x4030f3
xor eax, eax
mov word [0x7f1c3c], ax
movzx eax, byte [esi + 0xaf]
mov ecx, 0xff
mov word [0x7f1d3c], ax
movzx eax, word [esi + 0xae]
and ax, cx
mov word [0x7f1d3e], ax
movzx eax, word [0x7ffe02d0]
mov word [0x7f1d40], ax
mov ecx, eax
mov byte [0x7f1d42], 0
cmp byte [0x7ffe0268], 0
je 0x40313a
mov ebx, dword [0x7ffe0264]
pop esi
mov byte [0x7f1d42], bl
cmp ebx, 1
pop ebx
jne 0x403154
and ecx, 0xffef
mov word [0x7f1d40], cx
test edx, edx
jne 0x403189
call fcn.00403060
cmp dword [0x7f1c2c], 6
ja 0x403189
jb 0x403171
cmp dword [0x7f1c30], 4
jae 0x403189
call fcn.00403060
cmp dword [0x7f1c2c], 0xa
jae 0x403189
mov dword [0x7f1c34], 1
ret
Function at 0x41da72
Capabilities:
Execute syscall

Disassembly:
mov edx, esp
sysenter
ret
Function at 0x4062e5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x40b508
cmp edx, dword [eax]
je 0x406307
add eax, 8
inc ecx
cmp eax, 0x40b598
jl 0x4062f8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x40b508]
jne 0x406435
mov eax, dword [0x40ba54]
cmp eax, 1
je 0x40640f
test eax, eax
jne 0x406338
cmp dword [0x40b1b4], 1
je 0x40640f
cmp edx, 0xfc
je 0x406435
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40636f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004037b0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004038a0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4063b2
lea eax, [ebp - 0x1a4]
push eax
call fcn.004038a0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40957c
push edi
call fcn.004077b0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004037b0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004037c0
lea eax, [ebp - 0xa0]
push 0x40955c
push eax
call fcn.004037c0
push dword [esi + 0x40b50c]
lea eax, [ebp - 0xa0]
push eax
call fcn.004037c0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00407726
add esp, 0x2c
pop edi
jmp 0x406435
lea eax, [ebp + 8]
lea esi, [esi + 0x40b50c]
push 0
push eax
push dword [esi]
call fcn.004038a0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x401000
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push ecx
push edx
push esi
enter 0x84, 0
sub ebp, 0x82
mov dword [ebp - 2], 0
call fcn.00401533
mov ebx, eax
xor eax, eax
mov dword [ebp + 0x7e], eax
lea eax, [ebp + 0x7e]
push eax
mov eax, ebx
or al, 0x40
push eax
mov eax, 0x401dc7
sub eax, fcn.00401592
push eax
push fcn.00401592
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
cmp dword [ebp + 0x7e], 0
je 0x40107a
mov eax, ebx
lea edx, [ebp - 2]
call fcn.00401461
mov eax, ebx
lea ecx, [ebx + 0x1b600]
call fcn.004014b3
mov esi, ecx
mov eax, ebx
or si, 1
cdq
idiv esi
lea edx, [eax + ecx]
mov eax, ebx
lea ebx, [ebp - 2]
or eax, 0x402054
call fcn.00401592
xor eax, eax
lea esp, [ebp + 0x82]
pop ebp
pop esi
pop edx
pop ecx
pop ebx
ret

Function at 0x401533
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ecx
push edx
enter 0x11c, 0
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.DLL_GetCursorPos]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push 1
push 1
lea eax, [ebp - 0x11c]
push eax
mov dword [ebp - 4], 0xa
mov byte [ebp - 0x11c], 0
call dword [sym.imp.CRYPT32.DLL_CryptBinaryToStringA]
movzx eax, byte [ebp - 0x18]
sub eax, 0x41
leave
pop edx
pop ecx
ret
Function at 0x4ccfed
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x58266c]
cmp eax, 0xffffffff
jne 0x4cd0f9
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
mov dword [esp], 0xa8ee40
call sub.msvcrt.dll_memset
mov dword [0xa8ee40], 0x44
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov dword [esp], 0xa8ee84
call sub.msvcrt.dll_memset
mov dword [esp + 0x24], 0xa8ee84
mov dword [esp + 0x20], 0xa8ee40
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x8000000
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.cmd.exe__c_ver
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateProcessA]
call eax
sub esp, 0x28
test eax, eax
setne al
test al, al
je 0x4cd0ef
mov eax, dword [0xa8ee84]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call eax
sub esp, 8
mov eax, dword [0xa8ee84]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa8ee88]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0x58266c], 1
jmp 0x4cd0f9
mov dword [0x58266c], 0
mov eax, dword [0x58266c]
leave
ret
Function at 0x4de0e6
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004ddce2
test eax, eax
sete al
test al, al
je 0x4de112
mov eax, 0xfffffffe
mov edx, 0xffffffff
jmp 0x4de1c5
mov edx, dword [0x6f46dc]
mov eax, dword [ebp + 8]
shl eax, 3
mov ecx, eax
shl ecx, 4
mov edi, ecx
sub edi, eax
mov eax, edi
add eax, edx
mov dword [0xa7e14c], eax
mov eax, dword [0xa7e14c]
movzx eax, byte [eax + 0x70]
test al, al
je 0x4de149
mov eax, 0xfffffffc
mov edx, 0xffffffff
jmp 0x4de1c5
mov eax, dword [0x6f46d8]
mov edx, dword [ebp + 8]
shl edx, 2
add eax, edx
mov dword [0xa7e150], eax
mov edi, 0xa7e158
mov eax, dword [0xa7e150]
mov eax, dword [eax]
mov dword [esp + 4], 0xa7e15c
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [edi], eax
mov eax, dword [0xa7e158]
mov edx, dword [0xa7e15c]
mov ebx, eax
and bh, 0xff
mov esi, edx
and esi, 0
mov eax, ebx
xor eax, 0xffffffff
or eax, esi
test eax, eax
jne 0x4de1ba
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
setne al
test al, al
je 0x4de1ba
mov eax, 0xfffffffd
mov edx, 0xffffffff
jmp 0x4de1c5
mov eax, dword [0xa7e158]
mov edx, dword [0xa7e15c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4dfb6b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x30
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004ddce2
test eax, eax
sete al
test al, al
je 0x4dfba9
mov eax, 0xfffffffe
jmp 0x4dfd63
mov edx, dword [0x6f46dc]
mov eax, dword [ebp + 8]
shl eax, 3
mov ecx, eax
shl ecx, 4
mov ebx, ecx
sub ebx, eax
mov eax, ebx
add eax, edx
mov dword [0xa7e094], eax
mov eax, dword [0xa7e094]
movzx eax, byte [eax + 0xa]
test al, al
jne 0x4dfbde
mov eax, 0xfffffffd
jmp 0x4dfd63
cmp dword [ebp - 0x14], 0
jns 0x4dfbee
mov eax, 0xfffffffc
jmp 0x4dfd63
mov eax, dword [ebp - 0xc]
mov edx, eax
xor edx, 0xffffffff
mov eax, dword [ebp - 0x10]
xor eax, 0xffffffff
or eax, edx
test eax, eax
je 0x4dfc38
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004dfa31
mov dword [0xa7e098], eax
mov eax, dword [0xa7e098]
test eax, eax
setne al
test al, al
je 0x4dfc38
mov eax, dword [0xa7e098]
jmp 0x4dfd63
mov eax, dword [0x6f46d8]
mov edx, dword [ebp + 8]
shl edx, 2
add eax, edx
mov dword [0xa7e09c], eax
jmp 0x4dfd49
cmp dword [ebp - 0x14], 0
jle 0x4dfc69
mov dword [0xa7e0a0], 0xffffffff
add dword [ebp - 0x18], 1
adc dword [ebp - 0x14], 0xffffffff
jmp 0x4dfc7f
mov eax, dword [ebp - 0x18]
mov dword [0xa7e0a0], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov edx, dword [0xa7e0a0]
mov eax, dword [0xa7e09c]
mov eax, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xa7e0a8
mov dword [esp + 8], edx
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x4dfceb
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa7e0b0], eax
mov eax, dword [0xa7e0b0]
cmp eax, 5
je 0x4dfcdd
mov eax, dword [0xa7e0b0]
cmp eax, 0x21
jne 0x4dfce4
mov eax, 0xfffffff9
jmp 0x4dfd63
mov eax, 0xfffffff7
jmp 0x4dfd63
mov eax, dword [0xa7e0a8]
mov edx, dword [0xa7e0ac]
add dword [ebp + 0x14], eax
mov esi, dword [0xa7e094]
mov eax, dword [0xa7e094]
mov ecx, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
mov eax, dword [0xa7e0a8]
mov edx, dword [0xa7e0ac]
add eax, ecx
adc edx, ebx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov eax, dword [0xa7e0a0]
mov ecx, eax
mov ebx, 0
mov eax, dword [0xa7e0a8]
mov edx, dword [0xa7e0ac]
mov esi, ebx
xor esi, edx
xor eax, ecx
or eax, esi
test eax, eax
je 0x4dfd49
mov eax, 0xffffffff
jmp 0x4dfd63
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
or eax, edx
test eax, eax
setne al
test al, al
jne 0x4dfc4f
mov eax, 0
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x4f6c17
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4f6c61
mov dword [esp], 7
call fcn.004aa030
mov eax, dword [ebp - 0x14]
jmp 0x4f6cfc
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call eax
sub esp, 8
mov edx, eax
sub dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
cmp edx, eax
setne al
test al, al
je 0x4f6cbd
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp + 4], 1
mov dword [esp], 0
call fcn.004ab74a
mov dword [ebp - 0x14], eax
mov dword [esp], 0x33
call fcn.004aa030
mov eax, dword [ebp - 0x14]
jmp 0x4f6cfc
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.004ab74a
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x18]
leave
ret
Function at 0x4ff280
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 0xc]
mov dword [0xaa07e0], eax
jmp fcn.004fea70
Function at 0x500e60
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x1c
cmp byte [0x5829bc], 0
je 0x500ea0
mov eax, dword [0xaa0878]
test eax, eax
je 0x500ebd
mov dword [esp + 4], 0
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0xaa0878]
mov byte [eax + 0x38], 0
sub esp, 8
add esp, 0x1c
ret
mov dword [esp + 4], str.glutHideWindow
mov dword [esp], 0x5b2b38
call fcn.005048e0
mov eax, dword [0xaa0878]
test eax, eax
jne 0x500e75
cmp dword [0x582a14], 2
je 0x500e75
mov dword [esp + 4], str.glutHideWindow
mov dword [esp], 0x5b2be4
call fcn.005048e0
mov eax, dword [0xaa0878]
jmp 0x500e75

Function at 0x500ef0
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x1c
cmp byte [0x5829bc], 0
je 0x500f30
mov eax, dword [0xaa0878]
test eax, eax
je 0x500f4d
mov byte [eax + 0x39], 0
mov dword [esp + 4], 6
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0xaa0878]
mov byte [eax + 0x38], 0
sub esp, 8
add esp, 0x1c
ret
mov dword [esp + 4], str.glutIconifyWindow
mov dword [esp], 0x5b2b38
call fcn.005048e0
mov eax, dword [0xaa0878]
test eax, eax
jne 0x500f05
cmp dword [0x582a14], 2
je 0x500f05
mov dword [esp + 4], str.glutIconifyWindow
mov dword [esp], 0x5b2be4
call fcn.005048e0
mov eax, dword [0xaa0878]
jmp 0x500f05

Function at 0x5046e0
Capabilities:
Log keystrokes via polling

Disassembly:
push esi
mov esi, 1
push ebx
sub esp, 0x14
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
mov dword [esp], 0xa0
call ebx
sub esp, 4
test ax, ax
js 0x504713
mov dword [esp], 0xa1
call ebx
movsx esi, ax
sub esp, 4
shr esi, 0x1f
mov dword [esp], 0xa2
call ebx
mov edx, 2
sub esp, 4
test ax, ax
js 0x50473d
mov dword [esp], 0xa3
call ebx
mov edx, eax
sub esp, 4
shr edx, 0xe
and edx, 2
or esi, edx
mov dword [esp], 0xa4
call ebx
mov edx, 4
sub esp, 4
test ax, ax
js 0x504769
mov dword [esp], 0xa5
call ebx
mov edx, eax
sub esp, 4
shr edx, 0xd
and edx, 4
mov eax, esi
add esp, 0x14
or eax, edx
pop ebx
pop esi
ret

Function at 0x5048e0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov ebx, dword [0x582a48]
test ebx, ebx
je 0x504908
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [0x582a48]
add esp, 0x18
pop ebx
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
lea ebx, [esp + 0x24]
mov dword [esp + 8], 9
mov dword [esp + 4], 1
mov dword [esp], str.freeglut
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x582a1c]
test eax, eax
je 0x504959
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.__s_:
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
cmp byte [0x5829bc], 0
jne 0x5049a2
mov dword [esp], 1
call sub.msvcrt.dll_exit
call fcn.004fe7e0
jmp 0x504996
Function at 0x5049b0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [0x582a4c]
test eax, eax
je 0x5049d7
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [0x582a4c]
add esp, 0x18
pop ebx
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
lea ebx, [esp + 0x24]
mov dword [esp + 8], 9
mov dword [esp + 4], 1
mov dword [esp], str.freeglut
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x582a1c]
test eax, eax
je 0x504a28
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.__s_:
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
add esp, 0x18
pop ebx
ret

Function at 0x506780
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
movzx edx, byte [esp + 0x68]
mov dword [esp + 4], 1
mov ebp, dword [esp + 0x60]
mov dword [esp], 0xe8
movzx esi, byte [esp + 0x74]
movzx edi, byte [esp + 0x80]
mov byte [esp + 0x3f], dl
movzx ebx, byte [esp + 0x84]
call sub.msvcrt.dll_calloc
xor edx, edx
test eax, eax
je 0x5067d3
mov dword [eax + edx*4 + 0x54], 0
add edx, 1
cmp edx, 0x1c
jne 0x5067c3
mov edx, dword [0xaa0888]
mov dword [eax + 0xdc], 0
mov dword [eax + 0xe0], 0
add edx, 1
test ebp, ebp
mov dword [0xaa0888], edx
mov dword [eax + 8], edx
je 0x5068a7
mov edx, dword [ebp + 0xe0]
test edx, edx
je 0x5068c6
mov dword [edx], eax
mov dword [eax + 4], edx
mov dword [eax], 0
mov dword [ebp + 0xe0], eax
mov dword [eax + 0xd8], ebp
xor edx, edx
test ebp, ebp
setne dl
and edi, 0xff
mov byte [eax + 0xe4], bl
movzx ebx, byte [esp + 0x3f]
and esi, 0xff
mov dword [eax + 0x3c], 0x64
mov byte [eax + 0x50], 0
mov byte [eax + 0x51], 0
mov byte [eax + 0x53], 0
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], esi
mov dword [esp + 8], ebx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x78]
mov dword [esp], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x64]
mov dword [esp + 4], edx
call fcn.005005c0
mov eax, dword [esp + 0x38]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0xaa0864]
test edx, edx
je 0x5068d8
mov dword [edx], eax
mov dword [eax + 4], edx
mov dword [eax], 0
mov dword [0xaa0864], eax
jmp 0x506826
mov dword [eax + 4], 0
mov dword [ebp + 0xdc], eax
jmp 0x506814
mov dword [eax + 4], 0
mov dword [0xaa0860], eax
jmp 0x5068b6
Function at 0x5077b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x4c
test eax, eax
mov byte [esp + 0x2c], dl
je 0x5077f0
lea edx, [esp + 0x3c]
mov dword [esp + 0xc], edx
lea edx, [esp + 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 1
mov dword [esp + 4], edx
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
add esp, 0x4c
ret
xor eax, eax
add esp, 0x4c
ret
Function at 0x507a10
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
cmp byte [0x582a28], 0
je 0x507a20
ret
sub esp, 0x7c
mov dword [esp], str.GLUT_DIALS_SERIAL
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], ebp
call sub.msvcrt.dll_getenv
test eax, eax
je 0x507bb0
lea ebp, [esp + 0x44]
xor edx, edx
mov dword [ebp + edx], 0
add edx, 4
cmp edx, 0x1c
jb 0x507a4d
mov dword [esp + 0x44], 0x1c
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
test eax, eax
mov esi, eax
je 0x507c3a
mov dword [esp], 0x34
call sub.msvcrt.dll_malloc
mov ecx, 0xd
mov ebx, eax
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
lea eax, [ebx + 0x18]
mov dword [ebx], esi
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetCommState]
lea eax, [ebx + 4]
sub esp, 8
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
sub esp, 8
mov dword [esp + 0x44], 0x1c
mov dword [esp + 4], ebp
mov dword [esp], str.96_n_8_1
call dword [sym.imp.KERNEL32.dll_BuildCommDCBA]
sub esp, 8
mov dword [esp + 4], ebp
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetCommState]
sub esp, 8
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 1
mov dword [esp + 0x40], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov eax, dword [ebx]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edx, 0x20
mov eax, ebx
mov dword [0xaa08a0], ebx
sub esp, 4
call fcn.005077b0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x507860
mov dword [esp], 0xa
call fcn.00502f80
mov byte [0x582a28], 1
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x78]
add esp, 0x7c
ret
lea eax, [esp + 0x2c]
mov dword [esp + 0x24], 0x100
mov dword [esp + 0x28], 1
mov dword [esp + 8], eax
mov dword [esp + 4], str.SOFTWAREFreeGLUT
mov dword [esp], 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
sub esp, 0xc
test eax, eax
jne 0x507b97
lea eax, [esp + 0x24]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x28]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x10], 0xaa08c0
mov dword [esp + 8], 0
mov dword [esp + 4], str.DialboxSerialPort
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
jne 0x507c49
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xaa08c0
sub esp, 4
jmp 0x507a47
mov dword [0xaa08a0], 0
jmp 0x507b97
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
sub esp, 4
jmp 0x507b97