joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4dad3d
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4dad6b
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4dad89
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004daca3
jmp 0x4dad89
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4dad89
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004daca3
test edi, edi
mov eax, edi
jne 0x4dad73
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x402a36
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x446f50]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402aca
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402a87
cmp dword [ebp + 0x10], ebx
jne 0x402abe
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402a36
test eax, eax
jne 0x402a99
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402a6e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405e88
cmp eax, ebx
je 0x402ad1
push ebx
push dword [0x446f50]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402aca
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x446f50], ebx
jne 0x402ac7
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402ac7
jmp 0x402aca

Function at 0x402f18
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x402f45
mov ecx, dword [0x446ef8]
push edi
add eax, ecx
push edi
push eax
mov dword [0x41fc44], eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00403043
cmp eax, edi
jl 0x40303c
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x409018]
call ebx
test eax, eax
je 0x403039
cmp dword [ebp - 4], esi
jne 0x403039
push dword [ebp + 8]
add dword [0x41fc44], esi
call fcn.00403043
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x40303c
cmp dword [ebp + 0x10], edi
jne 0x403008
cmp dword [ebp + 8], edi
jle 0x403034
mov esi, 0x41bc40
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x402fb8
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x409018]
call ebx
test eax, eax
je 0x403039
cmp edi, dword [ebp - 4]
jne 0x403039
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403004
cmp dword [ebp + 0x14], edi
jne 0x403004
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41fc44], eax
cmp dword [ebp + 8], 0
jg 0x402fab
jmp 0x403034
push 0xfffffffffffffffe
jmp 0x40303b
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403013
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409018]
call ebx
test eax, eax
je 0x403039
mov eax, dword [ebp - 4]
add dword [0x41fc44], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x40303c
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x403043
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x41fc44]
sub esi, dword [0x413bb0]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
add eax, 0x1f4
cmp esi, ebx
mov dword [0x446eac], eax
jle 0x4031ad
push dword [0x427c54]
call fcn.004031f1
push ebx
push ebx
push dword [0x413bb0]
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x427c50], esi
mov dword [0x41fc40], ebx
mov ebp, 0x413c40
mov eax, dword [0x41fc48]
mov edi, 0x4000
sub eax, dword [0x427c54]
cmp eax, edi
jg 0x4030b8
mov edi, eax
mov esi, 0x41bc40
push edi
push esi
call fcn.004031bf
test eax, eax
je 0x40319f
add dword [0x427c54], edi
mov dword [0x413bd0], esi
mov dword [0x413bd4], edi
cmp dword [0x446eb0], ebx
je 0x40310f
cmp dword [0x446f40], ebx
jne 0x40310f
mov eax, dword [0x427c50]
push ebx
sub eax, dword [0x41fc44]
sub eax, dword [esp + 0x1c]
add eax, dword [0x413bb0]
mov dword [0x41fc40], eax
call fcn.00402bd3
pop ecx
mov ecx, 0x413bb8
mov dword [0x413bd8], ebp
mov dword [0x413bdc], 0x8000
call fcn.00405f82
test eax, eax
jl 0x4031a8
mov esi, dword [0x413bd8]
sub esi, ebp
je 0x403169
lea eax, [esp + 0x10]
push ebx
push eax
push esi
push ebp
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4031a4
cmp esi, dword [esp + 0x10]
jne 0x4031a4
add dword [0x413bb0], esi
cmp dword [0x413bd4], ebx
jne 0x4030de
jmp 0x403175
cmp dword [0x413bd4], ebx
jne 0x4031a8
cmp edi, ebx
je 0x4031a8
mov eax, dword [0x41fc44]
mov ecx, eax
sub ecx, dword [0x413bb0]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x4030a2
push ebx
push ebx
push eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4031ad
or eax, 0xffffffff
jmp 0x4031b7
push 0xfffffffffffffffe
jmp 0x4031aa
push 0xfffffffffffffffd
pop eax
jmp 0x4031b7
push 1
call fcn.00402bd3
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4

Function at 0x4053c6
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x43e4a8], 0x44
push eax
xor eax, eax
push 0x43e4a8
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405401
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x40548b
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.0040573a
test byte [ebp + 0xc], 8
mov dword [ebp - 8], eax
je 0x4054bf
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x446f28], eax
jmp 0x405653
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp - 4], ebx
je 0x4054dd
test eax, eax
je 0x4055fe
test byte [ebp + 0xc], 2
je 0x4055fe
mov esi, 0x439ca8
push edi
push esi
call fcn.00405b66
test ebx, ebx
je 0x4054fa
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405500
push edi
call fcn.004056a0
cmp byte [edi], 0
jne 0x40550e
cmp byte [0x439ca8], 0x5c
jne 0x405519
push 0x409010
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x148]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x4055f4
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.00405684
cmp byte [eax], 0
je 0x40555f
cmp byte [ebp - 0x18], 0
je 0x40555f
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405575
mov al, byte [esi + 1]
test al, al
je 0x4055d3
cmp al, 0x2e
jne 0x405575
cmp byte [esi + 2], 0
je 0x4055d3
push esi
push ebx
call fcn.00405b66
test byte [ebp - 0x148], 0x10
je 0x40559a
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4055d3
push dword [ebp + 0xc]
push edi
call fcn.0040548b
jmp 0x4055d3
push edi
call fcn.0040581e
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4055cb
test byte [ebp + 0xc], 4
je 0x4055c3
push edi
push 0xfffffffffffffff1
call fcn.00404f04
push 0
push edi
call fcn.004058b4
jmp 0x4055d3
inc dword [0x446f28]
jmp 0x4055d3
push edi
push 0xfffffffffffffff2
call fcn.00404f04
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40553d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 0
je 0x4055fe
and byte [ebx - 1], 0
xor esi, esi
pop ebx
cmp dword [ebp - 4], esi
je 0x405653
cmp dword [ebp - 8], esi
jne 0x405613
inc dword [0x446f28]
jmp 0x405653
push edi
call fcn.00405e61
test eax, eax
je 0x405653
push edi
call fcn.00405659
push edi
call fcn.0040581e
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40564b
test byte [ebp + 0xc], 4
je 0x40560b
push edi
push 0xfffffffffffffff1
call fcn.00404f04
push esi
push edi
call fcn.004058b4
jmp 0x405653
push edi
push 0xffffffffffffffe5
call fcn.00404f04
pop edi
pop esi
leave
ret 8
Function at 0x405ef4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x43ea34], 0
push esi
jne 0x405f2b
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405f05
mov dword [ecx*4 + 0x43ea30], eax
inc ecx
cmp ecx, 0x100
jl 0x405f00
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f5c
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x43ea30]
xor eax, esi
inc ecx
dec edx
jne 0x405f3e
pop edi
not eax
pop esi
ret 0xc

Function at 0x5c4230
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x142000]
mov dword [edi + 0x16e9e4], 0x489bc401
push edi
or ebp, 0xffffffff
jmp 0x5c425a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x5c4261
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5c4250
mov eax, 1
add ebx, ebx
jne 0x5c4273
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x5c4284
jne 0x5c4294
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5c4294
dec eax
add ebx, ebx
jne 0x5c4290
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x5c4268
xor ecx, ecx
sub eax, 3
jb 0x5c42ac
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x5c431e
sar eax, 1
mov ebp, eax
jmp 0x5c42b7
add ebx, ebx
jne 0x5c42b7
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x5c42c4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x5c42e8
inc ecx
add ebx, ebx
jne 0x5c42d4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x5c42c9
jne 0x5c42e5
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x5c42c9
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x5c4308
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x5c42f9
jmp 0x5c4256
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x5c4308
add edi, ecx
jmp 0x5c4256
pop esi
mov edi, esi
mov ecx, 0x8467
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x5c4326
cmp byte [edi], 0x1f
jne 0x5c4326
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 0x5c432b
lea edi, [esi + 0x1c0000]
mov eax, dword [edi]
or eax, eax
je 0x5c439a
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x1cff90]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1d00a8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x5c4358
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1d00ac]
or eax, eax
je 0x5c4394
mov dword [ebx], eax
add ebx, 4
jmp 0x5c4375
call dword [esi + 0x1d00b0]
popal
jmp fcn.0056ea48
Function at 0x4016c0
Capabilities:
Create thread
Terminate thread

Disassembly:
sub esp, 0x28
call fcn.004012f0
test al, al
jne 0x40187e
mov eax, dword [str.Mode]
push esi
push eax
xor eax, eax
call fcn.00401000
mov esi, eax
add esp, 4
cmp esi, 3
jae 0x401875
cmp esi, 2
je 0x401875
push edi
mov edi, dword [esp + 0x34]
lea ecx, [esp + 0xc]
push ecx
call fcn.004011e0
add esp, 4
test eax, eax
mov dword [0x4083f0], eax
je 0x40186b
call fcn.00401070
test al, al
jne 0x401854
push 0x401110
push 0x1f4
push 0
push 0
call dword [sym.imp.USER32.dll_SetTimer]
mov edi, eax
test edi, edi
mov dword [esp + 8], edi
je 0x401854
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x4083f4], eax
je 0x40184b
push 0x4083d8
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor eax, eax
cmp esi, 1
sete al
lea edx, [esp + 0x10]
push edx
push 0
mov byte [0x4083fc], 0
push eax
push 0x401390
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [0x4083f8], eax
je 0x401829
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
call esi
test eax, eax
je 0x4017e9
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
push ebp
mov ebp, dword [sym.imp.USER32.dll_TranslateMessage]
cmp eax, 0xffffffff
je 0x4017e4
lea edx, [esp + 0x18]
push edx
call ebp
lea eax, [esp + 0x18]
push eax
call edi
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
call esi
test eax, eax
jne 0x4017c0
mov edi, dword [esp + 0xc]
pop ebp
call fcn.00401140
mov edx, dword [0x4083f8]
push 0x1388
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401812
mov eax, dword [0x4083f8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [0x4083f8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4083f8], 0
mov edx, dword [0x4083f4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4083d8
mov dword [0x4083f4], 0
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push edi
push 0
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x34]
push eax
mov eax, dword [0x4083f0]
push ecx
call fcn.004012c0
add esp, 8
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret 0x10
xor eax, eax
pop esi
add esp, 0x28
ret 0x10
xor eax, eax
add esp, 0x28
ret 0x10

Function at 0x401960
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x401983
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 8]
mov dword [esi], ecx
mov eax, ecx
pop esi
add esp, 0x24
ret
mov eax, dword [esi]
pop esi
add esp, 0x24
ret

Function at 0x401963
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x401983
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 8]
mov dword [esi], ecx
mov eax, ecx
pop esi
add esp, 0x24
ret
mov eax, dword [esi]
pop esi
add esp, 0x24
ret
Function at 0x4031e0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x404651
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4083a4]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
xor ebx, ebx
mov dword [esi + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esi + 0x2c], ebx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esi], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 0x14], ecx
mov cl, byte [esp + 0x48]
cmp cl, bl
mov dword [esi + 8], edx
mov edx, dword [esp + 0x40]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x44]
mov byte [esp + 0x20], 1
mov dword [esi + 0xc], ebp
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], eax
mov byte [esi + 0x20], cl
mov dword [esi + 0x30], ebx
jne 0x4032c4
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x48], edi
jbe 0x403291
lea ecx, [edx + 0xc]
mov edx, eax
mov eax, dword [ecx]
cmp eax, edi
jbe 0x403278
mov edi, eax
add ecx, 0x10
sub edx, 1
jne 0x403270
cmp edi, 0x100000
mov dword [esp + 0x48], edi
mov eax, 0x4065f8
ja 0x403295
lea eax, [esp + 0x48]
mov eax, dword [eax]
mov dword [esi + 0x28], eax
add eax, 0xa
push eax
call fcn.0040397b
mov edi, eax
mov eax, dword [esi + 0x24]
add esp, 4
cmp eax, edi
je 0x4032bb
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esi + 0x24], edi
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor ecx, ecx
mov eax, ebp
mov edx, 0x44
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0040397b
add esp, 4
mov dword [esp + 0x48], eax
cmp eax, ebx
mov byte [esp + 0x20], 2
je 0x403312
push 0x402410
push 0x4023d0
push ebp
lea edi, [eax + 4]
push 0x44
push edi
mov dword [eax], ebp
call fcn.00403ac3
jmp 0x403314
xor edi, edi
mov eax, dword [esi + 0x2c]
cmp eax, edi
mov byte [esp + 0x20], 1
je 0x403344
cmp eax, ebx
je 0x403341
mov ecx, dword [eax - 4]
lea ebx, [eax - 4]
push 0x402410
push ecx
push 0x44
push eax
call fcn.00403a60
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esi + 0x2c], edi
mov ecx, esi
call 0x402e70
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x24

Function at 0x40398c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4083a4]
jne 0x403996
repz ret
jmp fcn.00403e3e
Function at 0x401cfa
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41910c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc4
mov dword [ebp - 0xd0], ecx
push 0
mov ecx, dword [ebp - 0xd0]
call fcn.004182b4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xd0]
mov dword [eax], 0x41a950
push 0x41f034
push 0x80
lea ecx, [ebp - 0x8c]
push ecx
push 0x41f040
push str.Type
push 0x41f050
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str.AUTO
lea edx, [ebp - 0x8c]
push edx
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x401d92
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0xc8], 0
jmp 0x401e29
push 0x41f060
lea ecx, [ebp - 0x8c]
push ecx
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x401dbd
mov edx, dword [ebp - 0xd0]
mov dword [edx + 0xc8], 3
jmp 0x401e29
push str.ETHER
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x401de8
mov ecx, dword [ebp - 0xd0]
mov dword [ecx + 0xc8], 2
jmp 0x401e29
push str.SERIAL
lea edx, [ebp - 0x8c]
push edx
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x401e13
mov eax, dword [ebp - 0xd0]
mov dword [eax + 0xc8], 1
jmp 0x401e29
push 0
push 0
push str.Error:_wrong_value_for__Loader_Type
call sub.MFC42.DLL_AfxMessageBox
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
push 0x41f098
push 0x40
lea ecx, [ebp - 0xcc]
push ecx
push str.C:FidiaCustom
push str.WORKDIR
push 0x41f0bc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [ebp - 0xcc]
push edx
call dword [sym.imp.MSVCRT.dll__chdir]
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret

Function at 0x4022d7
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4022fc
jmp 0x40236d
lea eax, [ebp - 0x20]
push eax
push 0x28
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402317
jmp 0x40236d
lea edx, [ebp - 8]
push edx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402333
jmp 0x40236d
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], 2
push 0
push 0
push 0x10
lea edx, [ebp - 0x18]
push edx
push 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push 5
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov esp, ebp
pop ebp
ret
Function at 0x404424
Capabilities:
Create thread
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x40444b
push str.File_handle_is_not_a_comm_handle._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x404609
cmp dword [0x422dfc], 0
je 0x404466
push str.Already_have_a_comm_file_open_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x404609
mov ecx, dword [ebp + 8]
mov dword [0x422dfc], ecx
mov edx, dword [ebp + 0xc]
mov dword [0x422df8], edx
mov eax, dword [ebp + 0x10]
mov dword [0x422dec], eax
mov ecx, dword [ebp + 0x14]
mov dword [0x422df4], ecx
mov edx, dword [ebp + 0x18]
mov dword [0x422df0], edx
lea eax, [ebp - 0x5c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommState]
lea edx, [ebp - 0x40]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommProperties]
lea ecx, [ebp - 0x74]
push ecx
mov edx, dword [0x422dfc]
push edx
call dword [sym.imp.KERNEL32.dll_GetCommMask]
lea eax, [ebp - 0x70]
push eax
mov ecx, dword [0x422dfc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
mov dword [ebp - 0x70], 0x2710
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
lea edx, [ebp - 0x70]
push edx
mov eax, dword [0x422dfc]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov ecx, dword [ebp - 0x54]
and ch, 0xbf
mov dword [ebp - 0x54], ecx
lea edx, [ebp - 0x5c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommState]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x422e10], eax
cmp dword [0x422e10], 0
jne 0x40455b
push 0
push 0x422e14
push 0x41f29c
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [0x422dfc], 0
xor eax, eax
jmp 0x404609
push 0x422e00
push 0
push 0
push 0x404aef
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x422e08], eax
cmp dword [0x422e08], 0
jne 0x4045ad
push 0
push 0x422e18
push str.Unable_to_create_Read_thread
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [0x422e00], 0
mov dword [0x422dfc], 0
xor eax, eax
jmp 0x404609
push 0x422e04
push 0
push 0
push 0x4047e1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x422e0c], eax
cmp dword [0x422e0c], 0
jne 0x404604
push 0
push 0x422e1c
push str.Unable_to_create_Write_thread
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
call fcn.004046d3
mov dword [0x422e04], 0
mov dword [0x422dfc], 0
xor eax, eax
jmp 0x404609
mov eax, 1
mov esp, ebp
pop ebp
ret