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

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x7c000]
push edi
or ebp, 0xffffffff
jmp 0x4e9eb2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4e9eb9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4e9ea8
mov eax, 1
add ebx, ebx
jne 0x4e9ecb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4e9edc
jne 0x4e9eec
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4e9eec
dec eax
add ebx, ebx
jne 0x4e9ee8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x4e9ec0
xor ecx, ecx
sub eax, 3
jb 0x4e9f04
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4e9f76
sar eax, 1
mov ebp, eax
jmp 0x4e9f0f
add ebx, ebx
jne 0x4e9f0f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4e9f1c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4e9f40
inc ecx
add ebx, ebx
jne 0x4e9f2c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4e9f21
jne 0x4e9f3d
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4e9f21
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4e9f60
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4e9f51
jmp 0x4e9eae
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4e9f60
add edi, ecx
jmp 0x4e9eae
pop esi
mov edi, esi
mov ecx, 0x2523
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x4e9f7e
cmp byte [edi], 0x15
jne 0x4e9f7e
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x4e9f83
lea edi, [esi + 0xe6000]
mov eax, dword [edi]
or eax, eax
je 0x4e9ff2
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xeac70]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xead10]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4e9fb0
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xead14]
or eax, eax
je 0x4e9fec
mov dword [ebx], eax
add ebx, 4
jmp 0x4e9fcd
call dword [esi + 0xead18]
popal
jmp 0x44c73c
Function at 0x402980
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404398
test esi, esi
jne 0x4029b6
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404488
jmp 0x4029d4
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402894
mov edi, eax
test esi, esi
je 0x4029d4
cmp dword [ebx], 0
je 0x4029d4
dec esi
jmp 0x4029bd
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x403014
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x427008], 0x8088405
inc edx
mov dword [ebx + 0x427008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x40356c
Capabilities:
Query or enumerate registry value

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

Function at 0x4041a0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x428044], 0
je 0x404201
cmp word [0x428218], 0xd7b2
jne 0x4041c9
cmp dword [0x428220], 0
jbe 0x4041c9
mov eax, 0x428214
call dword [0x428230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x427094
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404228
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x427034], 0
jne 0x40421d
push 0
push 0x42708c
push 0x427094
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404354
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.004026c0
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x428045], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x40431c
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x4054ac
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4056dc
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40552f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4056dc
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40552f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4056f8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4055b8
xor eax, eax
push ebp
push 0x4055b1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004052f4
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405596
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x405718
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405596
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4055b8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x4056d2
cmp byte [ebp - 0xd], 0
jne 0x4055ff
cmp byte [ebp - 0x12], 0
je 0x4056d2
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405618
dec ebx
cmp byte [ebx], 0x2e
je 0x405627
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405617
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4056d2
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405664
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4056d2
cmp byte [ebp - 0xd], 0
je 0x4056d2
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4056d2
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4055b8
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4056dc
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40552f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4056dc
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40552f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4056f8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4055b8
xor eax, eax
push ebp
push 0x4055b1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004052f4
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405596
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x405718
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405596
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4055b8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x4056d2
cmp byte [ebp - 0xd], 0
jne 0x4055ff
cmp byte [ebp - 0x12], 0
je 0x4056d2
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405618
dec ebx
cmp byte [ebx], 0x2e
je 0x405627
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405617
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4056d2
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405664
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4056d2
cmp byte [ebp - 0xd], 0
je 0x4056d2
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4056d2
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405d68
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x405dce
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00404608
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00403160
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x405db8
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405dd5
lea eax, [ebp - 0x10]
call fcn.00404398
ret

Function at 0x40a000
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40a039
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404488
jmp 0x40a042
mov eax, ebx
mov edx, esi
call fcn.004043ec
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40a04c
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40a06d
mov al, byte [esp]
jmp 0x40a06f
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40a6f4
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40a56c
mov eax, dword [0x427750]
cmp byte [eax], 0
je 0x40a770
mov eax, dword [0x427668]
call fcn.00402d50
call fcn.004027b4
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.004079b4
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40a7b8
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40a7a6
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x427644]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x428660]
call fcn.004052b8
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret
Function at 0x40b454
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x40b4b8
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.00404608
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00407574
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b4bf
lea eax, [ebp - 0xc]
call fcn.00404398
ret
Function at 0x425010
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404824
xor eax, eax
push ebp
push 0x42509c
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x42507c
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00404834
push eax
call sub.wsock32.dll_gethostbyname
mov ebx, eax
test ebx, ebx
jne 0x42505d
mov eax, esi
call fcn.00404398
jmp 0x425072
mov eax, dword [ebx + 0xc]
mov eax, dword [eax]
push dword [eax]
call sub.wsock32.dll_inet_ntoa
mov edx, eax
mov eax, esi
call fcn.00404590
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x425086
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4250a3
lea eax, [ebp - 4]
call fcn.00404398
ret
Function at 0x426120
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebx
push esi
push edi
push ebp
mov ebp, edx
mov edi, eax
xor ebx, ebx
push 2
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov esi, eax
test esi, esi
je 0x426178
push 0
push 0
push 0
push 0
push 0
push edi
push 1
push 2
push 0x110
push 0xf0000
mov eax, dword [0x429a88]
call fcn.00404834
push eax
push ebp
push esi
call sub.advapi32.dll_CreateServiceA
mov ebx, eax
push esi
call sub.advapi32.dll_CloseServiceHandle
test ebx, ebx
je 0x426176
mov bl, 1
jmp 0x426178
xor ebx, ebx
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x426180
Capabilities:
Query service status
Start service

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffe0
mov esi, eax
mov dword [esp + 8], 1
push 1
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov ebx, eax
test ebx, ebx
jle 0x426209
push 0x14
push esi
push ebx
call sub.advapi32.dll_OpenServiceA
mov esi, eax
test esi, esi
jle 0x426203
xor eax, eax
mov dword [esp], eax
push esp
push 0
push esi
call sub.advapi32.dll_StartServiceA
test al, al
je 0x4261fd
lea eax, [esp + 4]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test al, al
je 0x4261fd
jmp 0x4261f6
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push eax
call sub.kernel32.dll_Sleep_2
lea eax, [esp + 4]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test al, al
je 0x4261fd
cmp edi, dword [esp + 0x18]
jg 0x4261fd
cmp dword [esp + 8], 4
jne 0x4261d3
push esi
call sub.advapi32.dll_CloseServiceHandle
push ebx
call sub.advapi32.dll_CloseServiceHandle
cmp dword [esp + 8], 4
sete al
add esp, 0x20
pop edi
pop esi
pop ebx
ret
Function at 0x401135
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 4
mov ebx, dword [ebp + 8]
call fcn.004272be
cmp dword [0x43cb10], 0
je 0x401159
mov dword [esp], str.__pre_
call sub.cygwin1.dll_puts
test ebx, ebx
jne 0x40117b
cmp dword [0x43c838], 0
jne 0x40117b
cmp dword [0x43cb10], 0
jne 0x40117b
mov dword [esp], str.Thank_you_for_using_Mathomatic_
call sub.cygwin1.dll_puts
mov dword [esp], ebx
call sub.cygwin1.dll_exit
push ebp
mov ebp, esp
sub esp, 8
mov dword [esp], 1
call fcn.00401135
leave
ret

Function at 0x401232
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x101c
call fcn.004288a8
mov dword [esp], 0x42a3a6
call sub.cygwin1.dll_getenv
test eax, eax
je 0x4012e3
mov dword [esp + 0x10], str..mathomaticrc
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x42a3b9
mov dword [esp + 4], 0x1000
mov dword [esp], 0x433540
call sub.cygwin1.dll_snprintf
mov dword [esp + 4], 0x42a3bf
mov dword [esp], 0x433540
call sub.cygwin1.dll__fopen64
mov edi, eax
mov esi, 1
test eax, eax
jne 0x4012b9
jmp 0x4012e3
mov dword [esp], ebx
call fcn.00407bea
mov dword [esp], ebx
call fcn.0040e91b
test eax, eax
mov eax, 0
cmove esi, eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0x1000
lea eax, [ebp - 0x100c]
mov dword [esp], eax
call sub.cygwin1.dll_fgets
mov ebx, eax
test eax, eax
jne 0x40129f
mov dword [esp], edi
call sub.cygwin1.dll_fclose
jmp 0x4012e8
mov esi, 1
mov eax, esi
add esp, 0x101c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4062bc
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 4
cmp dword [0x433520], 0
je 0x4062d8
mov dword [esp], str.Shelling_out_disabled.
call fcn.00402e4d
call fcn.004272be
call sub.cygwin1.dll___errno
mov dword [eax], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.cygwin1.dll_system
mov ebx, eax
test eax, eax
jns 0x406305
mov dword [esp], str.system_3__call_failed
call sub.cygwin1.dll_perror
mov dword [esp], 0xa
call sub.cygwin1.dll_putchar
call fcn.00426dbd
mov eax, ebx
add esp, 4
pop ebx
pop ebp
ret
Function at 0x409dfb
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
cmp byte [0x433540], 0
jne 0x409e21
mov dword [esp], str.Set_options_startup_file_name_not_set.
call fcn.004029a3
mov eax, 0
jmp 0x409ee9
mov dword [esp + 4], 0x42e323
mov dword [esp], 0x433540
call sub.cygwin1.dll__fopen64
mov ebx, eax
test eax, eax
jne 0x409e5d
mov dword [esp], 0x433540
call sub.cygwin1.dll_perror
mov dword [esp], str.Unable_to_write_to_set_options_startup_file.
call fcn.004029a3
mov eax, 0
jmp 0x409ee9
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x2c
mov dword [esp + 4], 1
mov dword [esp], str.__Mathomatic_set_options_loaded_at_startup._n
call sub.cygwin1.dll_fwrite
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 1
mov dword [esp], str.__This_file_can_be_edited._n_n
call sub.cygwin1.dll_fwrite
mov dword [esp], ebx
call fcn.004099fb
mov dword [esp], ebx
call sub.cygwin1.dll_fclose
test eax, eax
jne 0x409ecc
mov dword [esp + 4], 0x433540
mov dword [esp], str.All_options_saved_in_startup_file___s_._n
call sub.cygwin1.dll_printf
mov eax, 1
jmp 0x409ee9
mov dword [esp], 0x433540
call sub.cygwin1.dll_perror
mov dword [esp], str.Error_saving_set_options.
call fcn.004029a3
mov eax, 0
add esp, 0x14
pop ebx
pop ebp
ret

Function at 0x409eef
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [esp + 8], str.15.1.5
mov dword [esp + 4], str.Mathomatic_version__s_n
mov eax, dword [0x43cce0]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov eax, dword [0x43cce0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Compile_time_defines_used:
call sub.cygwin1.dll_fwrite
mov eax, dword [0x43cce0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 7
mov dword [esp + 4], 1
mov dword [esp], str.CYGWIN
call sub.cygwin1.dll_fwrite
mov eax, dword [0x42a020]
mov dword [esp + 8], eax
mov dword [esp + 4], str._n_nThe_current_expression_array_size_is__d_tokens__n
mov eax, dword [0x43cce0]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
imul edx, dword [0x42a020], 0xce0
mov eax, 0x10624dd3
mul edx
shr edx, 6
mov dword [esp + 8], edx
mov dword [esp + 4], str.making_the_maximum_memory_usage__ld_kilobytes._n
mov eax, dword [0x43cce0]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov eax, dword [0x433520]
mov dword [esp + 8], eax
mov dword [esp + 4], str.The_current_security_level_is__d._n
mov eax, dword [0x43cce0]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov eax, 1
leave
ret
Function at 0x40e6b5
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1018
call fcn.004288a8
mov eax, dword [ebp - 0x10]
mov ebx, eax
mov edi, str.notepad
lea esi, [ebp - 0x100c]
mov dword [esp], str.EDITOR
call sub.cygwin1.dll_getenv
test eax, eax
cmove eax, edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s__s
mov dword [esp + 4], 0x1000
mov dword [esp], esi
call sub.cygwin1.dll_snprintf
mov dword [esp], esi
call fcn.004062bc
test eax, eax
je 0x40e73c
mov dword [esp], str.Error_executing_editor__check_EDITOR_environment_variable.
call fcn.004029a3
lea eax, [ebp - 0x100c]
mov dword [esp + 4], eax
mov dword [esp], str.Command_line____s_._n
call sub.cygwin1.dll_printf
mov eax, 0
jmp 0x40e766
call fcn.004025a8
mov dword [esp], ebx
call fcn.00408f18
test eax, eax
jne 0x40e761
mov dword [esp], str.Prepare_to_rerun_the_editor
call fcn.0040e5e8
test eax, eax
jne 0x40e6d6
mov eax, 1
add esp, 0x101c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x426c13
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
cmp dword [0x43c608], eax
jl 0x426cbb
mov dword [esp + 8], eax
mov dword [esp + 4], str.level__d:
mov eax, dword [0x43cce0]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp + 8], 0
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call fcn.00426be2
cmp dword [ebp + 0x14], 0
je 0x426ca6
cmp dword [ebp + 0x18], 0
jle 0x426ca6
mov eax, dword [0x43cce0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x430608
call sub.cygwin1.dll_fwrite
mov dword [esp + 8], 0
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], eax
mov edx, dword [ebp + 0x14]
mov dword [esp], edx
call fcn.00426be2
mov eax, dword [0x43cce0]
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sub.cygwin1.dll_fputc
leave
ret