joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409630
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x410008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x424
lea eax, [ebp - 0x42c]
mov esi, ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x430], 0x428
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
lea eax, [ebp - 0x430]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Module32FirstW]
mov edi, eax
test edi, edi
je 0x4096b2
nop dword [eax]
mov ecx, dword [ebp - 0x414]
cmp ecx, dword [0x4106b8]
je 0x4096b2
lea eax, [ebp - 0x430]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Module32NextW]
mov edi, eax
test edi, edi
jne 0x409690
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4096d0
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
mov edx, 0x208
lea eax, [ebp - 0x210]
nop dword [eax + eax]
cmp word [eax], 0
je 0x4096ee
add eax, 2
sub edx, 1
jne 0x4096e0
mov ecx, edx
mov eax, 0x208
sub eax, edx
neg ecx
sbb ecx, ecx
and ecx, eax
neg edx
sbb edx, edx
and edx, ecx
lea ecx, [ebp - 0x210]
lea ecx, [ecx + edx*2]
nop dword [eax]
mov ax, word [ecx]
lea ecx, [ecx - 2]
cmp ax, 0x5c
jne 0x409710
xor eax, eax
lea edx, [ebp - 0x210]
mov word [ecx + 4], ax
sub edx, esi
mov ecx, 0x208
nop
lea eax, [ecx + 0x7ffffdf6]
test eax, eax
je 0x40974e
movzx eax, word [edx + esi]
test ax, ax
je 0x40974e
mov word [esi], ax
add esi, 2
sub ecx, 1
jne 0x409730
test ecx, ecx
lea eax, [esi - 2]
pop edi
cmovne eax, esi
xor ecx, ecx
pop esi
pop ebx
mov word [eax], cx
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
Function at 0x409fc0
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x410008]
xor eax, esp
mov dword [esp + 0x438], eax
push ebx
push esi
push edi
push ecx
push 8
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a01a
mov ecx, str.CreateToolhelp32Snapshot__of_modules_
call fcn.00409f20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x428
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Module32FirstW]
test eax, eax
jne 0x40a05a
mov ecx, str.Module32First
call fcn.00409f20
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
mov ebx, dword [sym.imp.KERNEL32.dll_Module32NextW]
push dword [esp + 0x14]
lea eax, [esp + 0x3c]
push eax
call edi
add esp, 8
test eax, eax
je 0x40a086
lea eax, [esp + 0x18]
push eax
push esi
call ebx
test eax, eax
jne 0x40a066
jmp 0x40a08e
mov dword [esp + 0x10], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x444]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
Function at 0x40a0b0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x410008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 0xc]
push 0
push 2
mov dword [ebp - 0x238], edx
mov dword [ebp - 0x234], ecx
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40a101
mov ecx, str.CreateToolhelp32Snapshot__of_processes_
call fcn.00409f20
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x230]
mov dword [ebp - 0x230], 0x22c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x40a140
mov ecx, str.Process32First
call fcn.00409f20
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
nop word [eax + eax]
push dword [ebp - 0x234]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x40a245
push str._n_n
call fcn.00404c70
lea eax, [ebp - 0x20c]
push eax
push str._nPROCESS_NAME:___s
call fcn.00404c70
push str._n_______________________________________________________
call fcn.00404c70
push 0x40cd58
call fcn.00404c70
add esp, 0x14
push dword [ebp - 0x228]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x40a1cb
mov ecx, 0x40cc5c
call fcn.00409f20
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a1e9
push esi
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
test eax, eax
jne 0x40a1e0
mov ecx, 0x40cc74
call fcn.00409f20
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp dword [ebp + 8], 0
jne 0x40a213
mov edx, dword [ebp - 0x238]
mov ecx, dword [ebp - 0x228]
call fcn.00409fc0
test eax, eax
je 0x40a213
push str.module_found__skip_n
call fcn.0040a3c0
add esp, 4
jmp 0x40a245
push str.module_not_found__add_to_list_n
call fcn.0040a3c0
mov ecx, dword [edi + 4]
add esp, 4
cmp ecx, dword [edi + 8]
je 0x40a236
mov eax, dword [ebp - 0x228]
mov dword [ecx], eax
add dword [edi + 4], 4
jmp 0x40a245
lea eax, [ebp - 0x228]
push eax
push ecx
mov ecx, edi
call fcn.0040a280
lea eax, [ebp - 0x230]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40a150
push ebx
call esi
mov ecx, dword [ebp - 4]
mov eax, 1
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.0040a480
mov esp, ebp
pop ebp
ret

Function at 0x40ad2b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40ad6a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40ad6a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40ad6a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40ad6a
cmp dword [ecx + 0x74], 0xe
jbe 0x40ad6a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4cdc71
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x58366c]
cmp eax, 0xffffffff
jne 0x4cdd7d
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
mov dword [esp], 0xa8fe40
call sub.msvcrt.dll_memset
mov dword [0xa8fe40], 0x44
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov dword [esp], 0xa8fe84
call sub.msvcrt.dll_memset
mov dword [esp + 0x24], 0xa8fe84
mov dword [esp + 0x20], 0xa8fe40
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 0x4cdd73
mov eax, dword [0xa8fe84]
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 [0xa8fe84]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [0xa8fe88]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [0x58366c], 1
jmp 0x4cdd7d
mov dword [0x58366c], 0
mov eax, dword [0x58366c]
leave
ret
Function at 0x4ded6a
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.004de966
test eax, eax
sete al
test al, al
je 0x4ded96
mov eax, 0xfffffffe
mov edx, 0xffffffff
jmp 0x4dee49
mov edx, dword [0x6f56dc]
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 [0xa7f14c], eax
mov eax, dword [0xa7f14c]
movzx eax, byte [eax + 0x70]
test al, al
je 0x4dedcd
mov eax, 0xfffffffc
mov edx, 0xffffffff
jmp 0x4dee49
mov eax, dword [0x6f56d8]
mov edx, dword [ebp + 8]
shl edx, 2
add eax, edx
mov dword [0xa7f150], eax
mov edi, 0xa7f158
mov eax, dword [0xa7f150]
mov eax, dword [eax]
mov dword [esp + 4], 0xa7f15c
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [edi], eax
mov eax, dword [0xa7f158]
mov edx, dword [0xa7f15c]
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 0x4dee3e
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
setne al
test al, al
je 0x4dee3e
mov eax, 0xfffffffd
mov edx, 0xffffffff
jmp 0x4dee49
mov eax, dword [0xa7f158]
mov edx, dword [0xa7f15c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4e07ef
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.004de966
test eax, eax
sete al
test al, al
je 0x4e082d
mov eax, 0xfffffffe
jmp 0x4e09e7
mov edx, dword [0x6f56dc]
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 [0xa7f094], eax
mov eax, dword [0xa7f094]
movzx eax, byte [eax + 0xa]
test al, al
jne 0x4e0862
mov eax, 0xfffffffd
jmp 0x4e09e7
cmp dword [ebp - 0x14], 0
jns 0x4e0872
mov eax, 0xfffffffc
jmp 0x4e09e7
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 0x4e08bc
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.004e06b5
mov dword [0xa7f098], eax
mov eax, dword [0xa7f098]
test eax, eax
setne al
test al, al
je 0x4e08bc
mov eax, dword [0xa7f098]
jmp 0x4e09e7
mov eax, dword [0x6f56d8]
mov edx, dword [ebp + 8]
shl edx, 2
add eax, edx
mov dword [0xa7f09c], eax
jmp 0x4e09cd
cmp dword [ebp - 0x14], 0
jle 0x4e08ed
mov dword [0xa7f0a0], 0xffffffff
add dword [ebp - 0x18], 1
adc dword [ebp - 0x14], 0xffffffff
jmp 0x4e0903
mov eax, dword [ebp - 0x18]
mov dword [0xa7f0a0], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov edx, dword [0xa7f0a0]
mov eax, dword [0xa7f09c]
mov eax, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xa7f0a8
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 0x4e096f
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [0xa7f0b0], eax
mov eax, dword [0xa7f0b0]
cmp eax, 5
je 0x4e0961
mov eax, dword [0xa7f0b0]
cmp eax, 0x21
jne 0x4e0968
mov eax, 0xfffffff9
jmp 0x4e09e7
mov eax, 0xfffffff7
jmp 0x4e09e7
mov eax, dword [0xa7f0a8]
mov edx, dword [0xa7f0ac]
add dword [ebp + 0x14], eax
mov esi, dword [0xa7f094]
mov eax, dword [0xa7f094]
mov ecx, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
mov eax, dword [0xa7f0a8]
mov edx, dword [0xa7f0ac]
add eax, ecx
adc edx, ebx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov eax, dword [0xa7f0a0]
mov ecx, eax
mov ebx, 0
mov eax, dword [0xa7f0a8]
mov edx, dword [0xa7f0ac]
mov esi, ebx
xor esi, edx
xor eax, ecx
or eax, esi
test eax, eax
je 0x4e09cd
mov eax, 0xffffffff
jmp 0x4e09e7
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
or eax, edx
test eax, eax
setne al
test al, al
jne 0x4e08d3
mov eax, 0
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x4f789b
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 0x4f78e5
mov dword [esp], 7
call fcn.004aacb4
mov eax, dword [ebp - 0x14]
jmp 0x4f7980
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 0x4f7941
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.004ac3ce
mov dword [ebp - 0x14], eax
mov dword [esp], 0x33
call fcn.004aacb4
mov eax, dword [ebp - 0x14]
jmp 0x4f7980
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.004ac3ce
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 0x4fff00
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 0xc]
mov dword [0xaa17e0], eax
jmp fcn.004ff6f0
Function at 0x501ae0
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x1c
cmp byte [0x5839bc], 0
je 0x501b20
mov eax, dword [0xaa1878]
test eax, eax
je 0x501b3d
mov dword [esp + 4], 0
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0xaa1878]
mov byte [eax + 0x38], 0
sub esp, 8
add esp, 0x1c
ret
mov dword [esp + 4], str.glutHideWindow
mov dword [esp], 0x5b3b38
call fcn.00505560
mov eax, dword [0xaa1878]
test eax, eax
jne 0x501af5
cmp dword [0x583a14], 2
je 0x501af5
mov dword [esp + 4], str.glutHideWindow
mov dword [esp], 0x5b3be4
call fcn.00505560
mov eax, dword [0xaa1878]
jmp 0x501af5

Function at 0x501b70
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x1c
cmp byte [0x5839bc], 0
je 0x501bb0
mov eax, dword [0xaa1878]
test eax, eax
je 0x501bcd
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 [0xaa1878]
mov byte [eax + 0x38], 0
sub esp, 8
add esp, 0x1c
ret
mov dword [esp + 4], str.glutIconifyWindow
mov dword [esp], 0x5b3b38
call fcn.00505560
mov eax, dword [0xaa1878]
test eax, eax
jne 0x501b85
cmp dword [0x583a14], 2
je 0x501b85
mov dword [esp + 4], str.glutIconifyWindow
mov dword [esp], 0x5b3be4
call fcn.00505560
mov eax, dword [0xaa1878]
jmp 0x501b85

Function at 0x505360
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 0x505393
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 0x5053bd
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 0x5053e9
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 0x505560
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov ebx, dword [0x583a48]
test ebx, ebx
je 0x505588
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [0x583a48]
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 [0x583a1c]
test eax, eax
je 0x5055d9
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 [0x5839bc], 0
jne 0x505622
mov dword [esp], 1
call sub.msvcrt.dll_exit
call fcn.004ff460
jmp 0x505616
Function at 0x505630
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [0x583a4c]
test eax, eax
je 0x505657
lea eax, [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [0x583a4c]
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 [0x583a1c]
test eax, eax
je 0x5056a8
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 0x507400
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 0x507453
mov dword [eax + edx*4 + 0x54], 0
add edx, 1
cmp edx, 0x1c
jne 0x507443
mov edx, dword [0xaa1888]
mov dword [eax + 0xdc], 0
mov dword [eax + 0xe0], 0
add edx, 1
test ebp, ebp
mov dword [0xaa1888], edx
mov dword [eax + 8], edx
je 0x507527
mov edx, dword [ebp + 0xe0]
test edx, edx
je 0x507546
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.00501240
mov eax, dword [esp + 0x38]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0xaa1864]
test edx, edx
je 0x507558
mov dword [edx], eax
mov dword [eax + 4], edx
mov dword [eax], 0
mov dword [0xaa1864], eax
jmp 0x5074a6
mov dword [eax + 4], 0
mov dword [ebp + 0xdc], eax
jmp 0x507494
mov dword [eax + 4], 0
mov dword [0xaa1860], eax
jmp 0x507536
Function at 0x508430
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x4c
test eax, eax
mov byte [esp + 0x2c], dl
je 0x508470
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 0x508690
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
cmp byte [0x583a28], 0
je 0x5086a0
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 0x508830
lea ebp, [esp + 0x44]
xor edx, edx
mov dword [ebp + edx], 0
add edx, 4
cmp edx, 0x1c
jb 0x5086cd
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 0x5088ba
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 [0xaa18a0], ebx
sub esp, 4
call fcn.00508430
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5084e0
mov dword [esp], 0xa
call fcn.00503c00
mov byte [0x583a28], 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 0x508817
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], 0xaa18c0
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 0x5088c9
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xaa18c0
sub esp, 4
jmp 0x5086c7
mov dword [0xaa18a0], 0
jmp 0x508817
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
sub esp, 4
jmp 0x508817