joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4741a0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4b49c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.004ab0c6
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.00473b40
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004aaff4
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.004a77d8
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.004a77d8
push 1
push 0
push 0
mov ecx, esi
call fcn.004a7780
push 1
push 0
push 1
mov ecx, esi
call fcn.004a7780
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.004ab138
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x474320
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4b49e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.004ab0c6
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.00473b40
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.004aaff4
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x4743e4
cmp dword [esp + 0x40], 1
jne 0x4743e2
cmp ecx, eax
jge 0x4743e4
mov eax, ecx
cmp eax, 0xc8
jge 0x4743f0
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.004741a0
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.004ab138
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x474b70
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4b4a53
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.004a5bf6
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.004ab36e
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.004ac9c0
test eax, eax
je 0x474c8c
mov ecx, dword [esp + 0x3c]
call fcn.004ab39b
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x474c50
push edi
mov ecx, esi
call fcn.004a895a
mov ecx, esi
call fcn.00474df0
cmp dword [esp + 0x38], 1
jne 0x474c85
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.004a8ac4
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x4776c0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4776f3
push esi
call fcn.0047a7b0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4776ec
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x477779
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x477762
mov eax, dword [esi + 8]
test eax, eax
je 0x477717
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x47775e
cmp eax, 2
je 0x477762
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x47770a
cmp eax, 3
je 0x47773d
cmp eax, 1
jne 0x47770a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x47770a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x47770a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.004777a0
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x477788
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.004777a0
add esp, 4
pop esi
ret

Function at 0x484300
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x484366
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x484366
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x484347
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret
Function at 0x484e40
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x484e89
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x485300
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b51a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.00484eb0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.00484f30
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.00484f30
lea ecx, [esi + 0xc]
call fcn.004a455c
lea ecx, [esi + 0x10]
call fcn.004a455c
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.004864d0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.004864d0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.004864d0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.004a45d1
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.004a45d1
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x487d20
Capabilities:
Capture screenshot

Disassembly:
sub esp, 0x10
lea eax, [esp]
push esi
mov esi, dword [esp + 0x18]
push eax
mov ecx, dword [esi]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [esi]
push edx
call dword [sym.imp.USER32.dll_GetWindowDC]
push eax
mov dword [esi + 4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 1
push eax
mov dword [esi + 8], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x487d6a
push eax
mov eax, dword [esi + 8]
mov dword [esi + 0x18], 0
push eax
jmp 0x487d99
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
sub ecx, eax
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esp + 8]
mov dword [esi + 0x18], 1
sub edx, ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ecx, dword [esi + 8]
push eax
mov dword [esi + 0x10], eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0xc]
cmp eax, 1
jne 0x487ddb
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push 0xcc0020
push 0
push 0
push edx
mov edx, dword [esp + 0x18]
sub eax, edx
mov edx, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esi + 8]
push eax
push ecx
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esi + 8]
pop esi
add esp, 0x10
ret 4
Function at 0x4a69eb
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4a6a23
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004a4a78
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004a4a50
jmp 0x4a6a2f
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4a80e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4a8122
call fcn.004adf87
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4a8122
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4a8119
xor eax, eax
jmp 0x4a812a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004a8130
pop edi
pop esi
pop ebx
ret 4

Function at 0x4ae4b7
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 0x4ae4e5
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4ae503
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004ae41d
jmp 0x4ae503
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4ae503
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004ae41d
test edi, edi
mov eax, edi
jne 0x4ae4ed
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x433000
Capabilities:
Encode data using xor

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..retplne
nop
mov ebx, 0x40de38
mov ecx, 0x60d64113
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x43304e
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x433024
nop
nop
nop
nop
mov eax, section..reloc
nop
mov ebx, 0x4304d8
mov ecx, 0x129f71cb
nop
nop
nop
nop
test eax, eax
nop
nop
je 0x433084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x43306c
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x401f50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401fab
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401fab
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x401f98
cmp esi, edx
jae 0x401fab
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x401f86
cmp esi, edx
jae 0x401fab
xor eax, eax
cmp word [esi], ax
pop edi
cmove esi, eax
mov eax, esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x403c00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov ecx, 0x4091e0
push 0
call fcn.004042ac
mov edi, eax
mov esi, 1
test edi, edi
je 0x403d68
mov ebx, dword [ebp + 8]
mov eax, ebx
shr eax, 4
mov dword [ebp - 4], eax
inc eax
movzx eax, ax
mov dword [ebp + 8], eax
nop dword [eax]
push 0
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x403c61
push ebx
mov edx, eax
mov ecx, edi
call fcn.00401f50
add esp, 4
test eax, eax
jne 0x403c7c
push esi
mov ecx, 0x4091e0
call fcn.004042ac
mov edi, eax
inc esi
test edi, edi
je 0x403d68
mov eax, dword [ebp + 8]
jmp 0x403c40
test edi, edi
je 0x403d68
mov eax, dword [ebp - 4]
inc eax
push 6
movzx eax, ax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp + 8], eax
test eax, eax
je 0x403d68
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x403d68
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x403d68
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and ebx, 0xf
jbe 0x403ce9
cmp esi, ecx
jae 0x403d68
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ebx, 1
jne 0x403cd3
cmp esi, ecx
jae 0x403d68
cmp word [esi], 0
je 0x403d68
movzx eax, word [esi]
lea ecx, [esi + 2]
push 0
push 0
push 0
push 0
push eax
push ecx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
js 0x403d73
mov ebx, dword [ebp - 8]
mov edx, 1
mov ecx, dword [ebx]
sub edx, dword [ecx - 4]
mov ecx, dword [ecx - 8]
sub ecx, edi
or edx, ecx
jge 0x403d31
push edi
mov ecx, ebx
call fcn.00403d80
movzx eax, word [esi]
push 0
push 0
push edi
push dword [ebx]
push eax
lea eax, [esi + 2]
push eax
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x403d73
mov dword [eax - 0xc], edi
mov eax, dword [ebx]
mov byte [edi + eax], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.004010e0
int3

Function at 0x404e65
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404ea4
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404ea4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404ea4
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404ea4
cmp dword [ecx + 0x74], 0xe
jbe 0x404ea4
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x1003ee0
Capabilities:
Accept command line arguments

Disassembly:
add byte [ecx], al
pop edi
pop esi
pop ebp
xor eax, dword [ebx - 0x1f3b7ca5]
ret
mov eax, dword [0x1c36290]
jp 0x1003f3c
push esi
nop
xor eax, 0xd8001084
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
test dword [ebp - 0x2800fd8b], edx
test eax, eax
sbb eax, 0x1b807
add byte [eax], al
jmp 0x1003f11
std
nop
stosb byte es:[edi], al
add byte [ecx], al
cmp eax, 1
jne 0x1003f22
call edi
pop edi
adc al, 0x5d
pop ebx
ret
cmp eax, 2
jne 0x1003ed0
call esi
mov esp, dword [ebp + 0x100c55c]
aas
add byte [ebx - 8], ah
mov eax, dword [0x100aab0]
push 0
push 0xffffffffffffffff
push edi
push 1
push eax
jmp dword [ebx + ecx*4 + 0x75f6f778]
Function at 0x402e50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x404148
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x407018]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x407018]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0x40], 0
je 0x402fd7
cmp byte [edi + 0x45], 0
je 0x402fd7
push 0xffffffffffffffff
call fcn.004022d0
cmp eax, 0xffffffff
jne 0x402eb0
xor al, al
jmp 0x402fd9
sub esp, 8
lea ecx, [esp + 0x20]
call fcn.00402c60
mov dword [esp + 0x40], 0
mov ebx, dword [esp + 0x2c]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x2c]
cmp ebx, 0x10
lea edx, [esp + 0x1c]
cmovae edx, dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
cmovae ecx, dword [esp + 0x1c]
add eax, edx
push eax
push ecx
mov ecx, dword [edi + 0x40]
lea eax, [edi + 0x48]
push eax
call dword [sym.imp.MSVCP110.dll_public:_int___thiscall_std::codecvt_char__char__int_::unshift_int___char___char___char___const]
sub eax, 0
je 0x402f0f
dec eax
je 0x402f13
sub eax, 2
je 0x402fbd
xor bl, bl
jmp 0x402fbf
mov byte [edi + 0x45], 0
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmp ebx, 0x10
lea eax, [esp + 0x18]
cmovae eax, ecx
sub esi, eax
je 0x402f4b
push dword [edi + 0x50]
lea eax, [esp + 0x1c]
push esi
cmp ebx, 0x10
cmovae eax, ecx
push 1
push eax
call dword [sym.imp.MSVCR110.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x402f08
cmp byte [edi + 0x45], 0
je 0x402fbd
test esi, esi
jne 0x402ec4
mov ecx, dword [esp + 0x28]
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x402fb2
lea esi, [ecx + 8]
push ecx
push esi
lea ecx, [esp + 0x20]
call fcn.00403170
test al, al
je 0x402ec4
cmp dword [esp + 0x2c], 0x10
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x18]
cmovae ecx, dword [esp + 0x18]
xorps xmm0, xmm0
movq qword [ecx + eax], xmm0
cmp dword [esp + 0x2c], 0x10
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
mov dword [esp + 0x28], esi
mov byte [eax + esi], 0
jmp 0x402ec4
push str.string_too_long
call dword [sym.imp.MSVCP110.dll_void___cdecl_std::_Xlength_error_char_const__]
mov bl, 1
cmp dword [esp + 0x2c], 0x10
jb 0x402fd3
push dword [esp + 0x18]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov al, bl
jmp 0x402fd9
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004035b2
mov esp, ebp
pop ebp
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x51a810]
cmp byte [eax + 0x519d7f], 0xa
jne 0x401014
dec eax
mov dword [0x51a810], eax
push 0x519d80
push str._n_LINE:___s
call fcn.004042fe
mov ecx, dword [esp + 0xc]
push ecx
push str._n_ERROR:__s_n
call fcn.004042fe
add esp, 0x10
push 3
call fcn.00404229
nop
nop
nop
nop

Function at 0x4010a0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x51a810], 0x700
jb 0x4010c0
push str._n_ERROR:_INVOCATION_LINE_TOO_LONG_n
call fcn.004042fe
add esp, 4
push 3
call fcn.00404229
ret

Function at 0x401490
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax], 0
jne 0x4014a8
push str._n_ERROR:_NON_NULL_ARGUMENT_EXPECTED_n
call fcn.004042fe
add esp, 4
jmp 0x4014b6
push eax
push str._n_ERROR:_UNKNOWN_OH251_CONTROL__s_n
call fcn.004042fe
add esp, 8
push 3
call fcn.00404229
nop
nop
nop

Function at 0x401e70
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x50da88]
push ebx
push ebp
push esi
push edi
push eax
push str.__s_
push 0x519d80
mov dword [0x51a810], 0
call fcn.004045ad
mov esi, dword [esp + 0x24]
mov ebp, eax
add esp, 0xc
mov eax, dword [esi + 4]
test eax, eax
je 0x401eba
push eax
lea ecx, [ebp + 0x519d80]
push str.__s_
push ecx
call fcn.004045ad
add esp, 0xc
add ebp, eax
mov eax, dword [esp + 0x14]
cmp eax, 2
jle 0x401f09
add eax, 0xfffffffe
lea edx, [esi + 8]
mov dword [esp + 0x18], eax
mov esi, dword [edx]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebp + 0x519d80]
mov eax, ecx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
add ebp, eax
mov eax, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp + 0x519d80], 0x20
inc ebp
add edx, 4
dec eax
mov dword [esp + 0x18], eax
jne 0x401ecd
mov bl, 0xa
push 0x51a5a0
mov byte [ebp + 0x519d80], bl
mov byte [ebp + 0x519d81], 0
mov dword [0x51a580], 0x519d80
call fcn.004010d0
mov al, byte [0x51a814]
add esp, 4
cmp al, bl
jne 0x401f5b
mov eax, dword [0x50dce0]
test eax, eax
mov eax, str._n_USAGE:__OH251_inputfile___HEXFILE__filename____n______________________________HEX__H386___n______________________________RANGE__lowadr_highadr____n______________________________OFFSET______number____n____________Range_addresses:__0xnnnnnn___0xnnnnnn__n
jne 0x401f4b
mov eax, str._n_USAGE:__OHX51_inputfile___HEXFILE__filename____n______________________________HEX__H386___n______________________________RANGE__lowadr_highadr____n______________________________OFFSET______number____n______________________________MERGE32K___n____________Range_addresses:__0xnnnnnn___0xnnnnnn__n
push eax
call fcn.004042fe
add esp, 4
push 3
call fcn.00404229
push 0x51a6e0
call fcn.004010d0
call fcn.00403d50
mov edi, 0x51a6e0
or ecx, 0xffffffff
xor eax, eax
push 0x40c294
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x51a960
mov edx, ecx
mov esi, edi
mov edi, 0x51a960
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00401e00
add esp, 0xc
call fcn.00401db0
pop edi
pop esi
pop ebp
pop ebx
ret