joyce8/EMBER2024-capa huggingface dataset:
Function at 0x42eafb
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x443320
je 0x42ebb7
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x42eb9f
mov esi, dword [ebx + 4]
jmp 0x42eb99
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x42eb89
cmp dword [ebp - 0xc], 4
jne 0x42eb89
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x42eb81
or dword [eax + 0x9c], ecx
jmp 0x42eb89
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x42eb4d
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x42eb30
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x42f065
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x433079
call fcn.00413e08
sub esp, 0x11c
mov eax, dword [0x444480]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x124]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x42f15e
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x42f132
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.00406b9d
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.0042f065
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.0040615d
test bl, bl
jne 0x42f132
or dword [ebp - 4], 0xffffffff
jmp 0x42f0a3
cmp esi, 0x103
je 0x42f142
cmp esi, 0x3f2
jne 0x42f152
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
mov eax, esi
call fcn.004130de
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4302e1
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x430316
cmp edi, dword [esi + 0xc]
jge 0x430316
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x430316
cmp edi, dword [eax + 8]
jge 0x430316
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x430318
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x43041c
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x430450
jmp fcn.00423c09
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

Function at 0x4304c1
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x4305ba
cmp eax, dword [edi + 0xc]
jge 0x4305ba
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x430512
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x4305a3
cmp dword [ebp + 0xc], ebx
je 0x4305a3
jmp 0x43053c
push 0x10
call fcn.004301ad
cmp eax, ebx
je 0x430528
mov ecx, eax
call fcn.00430413
mov esi, eax
jmp 0x43052a
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x430553
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x430563
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x430575
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00423c09
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.004130f0
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x4305b5
cmp ecx, dword [esi + 8]
jge 0x4305b5
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x4305bb
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x43067a
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 0x4306a8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4306c6
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004305e4
jmp 0x4306c6
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4306c6
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.004305e4
test edi, edi
mov eax, edi
jne 0x4306b0
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x4473d4]
test ecx, ecx
je 0x430779
jmp 0x430679
ret 8

Function at 0x12509010
Capabilities:
Encode data using xor

Disassembly:
and ch, byte [eax - 0x556553ae]
xchg edi, eax
std
pop esp
popfd
mov eax, 0x7ea45589
inc ecx
and dword [eax + 0x2e], ebp
rcr bh, cl
cmp eax, 0x2212447f
test byte [edx], al
retf 0xcc80
movsd dword es:[edi], dword [esi]
mov eax, 0xff52132b
stosd dword es:[edi], eax
adc edx, dword [esi]
test dword [ebp + 0x29], ebx
mov ah, 0xbf
xor esp, 0xffffffea
push 0x54a247f6
adc dl, ch
sub byte [edi + 0x2e], ch
mov dword [0xc6ecd23c], eax
sub eax, 0xa15d787e
in al, 0xfc
xor al, 0x85
in al, dx
outsd dx, dword [esi]
pop esp
xchg edx, eax
pop eax
or byte [ebp + edx*2 - 0x48a00b2e], 0x1d
imul ebp, ecx, 0x10
outsb dx, byte [esi]
loope 0x12508feb
in al, 0xc0
scasd eax, dword es:[edi]
in eax, 0x9c
inc ebp
adc byte [eax - 0x70], dl
dec ebp
rcl byte [edi + 0x6c95bee2], 0x3e
pop ebx
xchg esi, eax
push ecx
das
inc edi
xor eax, esi
adc ah, byte [0xa461f0c0]
sahf
mov bh, 0xea
invalid

Function at 0x1251717b
Capabilities:
Encode data using xor

Disassembly:
aam 0x7f
rcl byte [ecx - 0x4da638f6], cl
push ss
stosb byte es:[edi], al
and esp, dword [eax]
invalid
invalid
movsd dword es:[edi], dword [esi]
cmp dh, byte [edi - 0x76]
mov ah, 0x2d
sub eax, dword [0xeb6b059d]
push eax
lodsb al, byte [esi]
or edx, ebp
mov al, byte [0xd653335c]
jne 0x1251713a
mov dl, 0x93
mov dword [0x4853222b], ecx
or ecx, dword [ecx - 0x6087d799]
xor ebp, dword [ecx + 0x4ab0d473]
adc byte [ebp - 0x2d], cl
loop 0x1251713f
invalid
Function at 0x404b30
Capabilities:
Parse credit card information

Disassembly:
push edi
mov edi, ecx
mov eax, dword [edi]
test eax, eax
je 0x404c60
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x404c60
push esi
xor esi, esi
test ecx, ecx
jle 0x404c5f
push ebx
mov bl, byte [esp + 0x10]
mov eax, dword [eax + 0x10]
mov al, byte [esi + eax]
mov cl, al
or cl, 0x20
cmp cl, 0x61
jl 0x404b71
cmp cl, 0x7a
jle 0x404c52
cmp al, 0x30
jl 0x404b7d
cmp al, 0x39
jle 0x404c52
cmp al, 0x5f
je 0x404c52
cmp al, 0x2d
je 0x404c52
cmp al, 0x2e
je 0x404c52
cmp al, 0x7e
je 0x404c52
cmp al, 0x3a
je 0x404c52
cmp al, 0x40
je 0x404c52
cmp al, 0x2f
je 0x404c52
cmp al, 0x3f
je 0x404c52
cmp al, 0x21
je 0x404c52
cmp al, 0x24
je 0x404c52
cmp al, 0x27
je 0x404c52
cmp al, 0x28
je 0x404c52
cmp al, 0x29
je 0x404c52
cmp al, 0x2a
je 0x404c52
cmp al, 0x2c
je 0x404c52
cmp al, 0x3b
je 0x404c52
test bl, bl
jne 0x404c15
test al, al
js 0x404c52
cmp al, 0x22
je 0x404c52
cmp al, 0x3c
je 0x404c52
cmp al, 0x3e
je 0x404c52
cmp al, 0x5c
je 0x404c52
cmp al, 0x5e
je 0x404c52
cmp al, 0x60
je 0x404c52
cmp al, 0x7b
je 0x404c52
cmp al, 0x7c
je 0x404c52
cmp al, 0x7d
je 0x404c52
movzx ecx, al
shr ecx, 4
mov dl, byte [ecx + str.0123456789ABCDEF]
push 2
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], dl
and eax, 0xf
mov al, byte [eax + str.0123456789ABCDEF]
push ecx
lea edx, [esi + 1]
push edx
mov ecx, edi
mov byte [esp + 0x1d], al
call fcn.004049e0
mov eax, dword [edi]
mov ecx, dword [eax + 0x10]
mov byte [esi + ecx], 0x25
add esi, 3
jmp 0x404c53
inc esi
mov eax, dword [edi]
cmp esi, dword [eax + 8]
jl 0x404b58
pop ebx
pop esi
pop edi
ret 4

Function at 0x40ce50
Capabilities:
Get file attributes

Disassembly:
sub esp, 0x82c
mov eax, dword [0x42a3ac]
xor eax, dword [esp + 0x82c]
push esi
mov dword [esp + 0x82c], eax
mov eax, dword [esp + 0x834]
push edi
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x410
call fcn.0040cbc0
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test esi, esi
mov edi, eax
je 0x40ceae
cmp word [esi - 2], 1
lea eax, [esi - 2]
jne 0x40ceae
push eax
call fcn.0041249e
add esp, 4
mov ecx, dword [esp + 0x830]
xor ecx, dword [esp + 0x834]
mov eax, edi
pop edi
pop esi
call fcn.00412490
add esp, 0x82c
ret 4

Function at 0x40cf80
Capabilities:
Create directory

Disassembly:
sub esp, 0x82c
mov eax, dword [0x42a3ac]
xor eax, dword [esp + 0x82c]
push esi
mov dword [esp + 0x82c], eax
mov eax, dword [esp + 0x834]
push edi
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x410
call fcn.0040cbc0
mov ecx, dword [esp + 0x83c]
mov esi, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test esi, esi
mov edi, eax
je 0x40cfe6
cmp word [esi - 2], 1
lea eax, [esi - 2]
jne 0x40cfe6
push eax
call fcn.0041249e
add esp, 4
mov ecx, dword [esp + 0x830]
xor ecx, dword [esp + 0x834]
mov eax, edi
pop edi
pop esi
call fcn.00412490
add esp, 0x82c
ret 8
Function at 0x40e400
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
test ebp, ebp
push edi
je 0x40e412
mov dword [ebp], 0
mov eax, dword [esp + 0x10]
push 0
push 0
push 3
push 0
push 7
push 0x80000000
push eax
call fcn.0040ced0
mov edi, eax
cmp edi, 0xffffffff
jne 0x40e438
pop edi
pop ebp
xor eax, eax
pop ebx
ret
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
inc esi
mov dword [esp + 0x18], esi
je 0x40e49d
cmp esi, 0x7ffffffe
ja 0x40e49d
push esi
call fcn.00412380
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40e494
push 0
lea ecx, [esp + 0x1c]
push ecx
dec esi
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e494
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
mov eax, dword [esp + 0x18]
je 0x40e489
mov dword [ebp], eax
pop esi
pop edi
mov byte [ebx + eax], 0
pop ebp
mov eax, ebx
pop ebx
ret
push ebx
call fcn.00412392
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x41393f
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x422eb8
call fcn.00414df0
mov edi, 0x94
mov eax, edi
call fcn.004191c0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x42b824], ecx
mov eax, dword [esi + 4]
mov dword [0x42b830], eax
mov edx, dword [esi + 8]
mov dword [0x42b834], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42b828], esi
cmp ecx, 2
je 0x41399f
or esi, 0x8000
mov dword [0x42b828], esi
shl eax, 8
add eax, edx
mov dword [0x42b82c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4139da
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4139da
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4139f2
cmp eax, 0x20b
je 0x4139df
mov dword [ebp - 0x1c], esi
jmp 0x413a06
cmp dword [ecx + 0x84], 0xe
jbe 0x4139da
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x413a00
cmp dword [ecx + 0x74], 0xe
jbe 0x4139da
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041427c
pop ecx
test eax, eax
jne 0x413a1a
push 0x1c
call fcn.0041391b
pop ecx
call fcn.00416047
test eax, eax
jne 0x413a2b
push 0x10
call fcn.0041391b
pop ecx
call fcn.00419130
mov dword [ebp - 4], esi
call fcn.00418f32
test eax, eax
jge 0x413a44
push 0x1b
call fcn.004138f6
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42cf00], eax
call fcn.00418e10
mov dword [0x42b6b4], eax
call fcn.00418d6e
test eax, eax
jge 0x413a6a
push 8
call fcn.004138f6
pop ecx
call fcn.00418b3b
test eax, eax
jge 0x413a7b
push 9
call fcn.004138f6
pop ecx
call fcn.00415b07
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x413a8e
push eax
call fcn.004138f6
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00418ad2
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x413aaf
movzx eax, word [ebp - 0x34]
jmp 0x413ab2
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.0040feb0
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x413ad0
push edi
call fcn.00415c3f
call fcn.00415c61
jmp 0x413b02
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00414e2b
ret
Function at 0x415b6c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.00414231
xor esi, esi
inc esi
cmp dword [0x42b864], esi
pop ecx
jne 0x415b94
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x42b860], esi
mov byte [0x42b85c], al
jne 0x415bfa
mov ecx, dword [0x42ced4]
test ecx, ecx
je 0x415bdb
mov eax, dword [0x42ced0]
sub eax, 4
cmp eax, ecx
jmp 0x415bd4
mov eax, dword [eax]
test eax, eax
je 0x415bc6
call eax
mov eax, dword [0x42ced0]
sub eax, 4
cmp eax, dword [0x42ced4]
mov dword [0x42ced0], eax
jae 0x415bbe
mov eax, 0x4250e8
mov esi, 0x4250f0
cmp eax, esi
mov edi, eax
jae 0x415bfa
mov eax, dword [edi]
test eax, eax
je 0x415bf3
call eax
add edi, 4
cmp edi, esi
jb 0x415beb
mov eax, 0x4250f4
mov esi, 0x4250fc
cmp eax, esi
mov edi, eax
jae 0x415c19
mov eax, dword [edi]
test eax, eax
je 0x415c12
call eax
add edi, 4
cmp edi, esi
jb 0x415c0a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x415c2a
push 8
call fcn.0041419d
jmp 0x415c3c
push dword [ebp + 8]
mov dword [0x42b864], 1
call fcn.00415ac5
pop ecx
pop ebp
ret
Function at 0x4165dc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x42a3ac]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x416605
xor eax, eax
jmp 0x416773
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x42bda0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x416638
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0041be28
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41670a
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x416745
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x416693
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x416684
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x416667
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4166d3
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x4166dc
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x416658
jmp 0x4166de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x41676e
cmp dword [ebp - 8], edi
je 0x416745
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x416737
call fcn.00415cf5
mov dword [eax], 9
call fcn.00415cfe
mov dword [eax], esi
jmp 0x416740
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41672c
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x4166de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x4166de
push dword [ebp - 8]
call fcn.00415d07
pop ecx
or eax, 0xffffffff
jmp 0x416771
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41675a
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x41675a
xor eax, eax
jmp 0x416771
call fcn.00415cf5
mov dword [eax], 0x1c
call fcn.00415cfe
mov dword [eax], edi
jmp 0x416740
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.00412490
leave
ret
Function at 0x4187be
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x42a3ac]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x42ad50]
je 0x4187eb
inc eax
cmp eax, 0x12
jb 0x4187dc
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x42ad50]
jne 0x41891f
mov eax, dword [0x42b6bc]
cmp eax, 1
je 0x4188fa
cmp eax, edx
jne 0x41881b
cmp dword [0x42a404], 1
je 0x4188fa
cmp ecx, 0xfc
je 0x41891f
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x418854
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00419200
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00416160
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x418896
lea eax, [ebp - 0x10c]
push eax
call fcn.00416160
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x422ffc
push edi
call fcn.00412f50
add esp, 0x10
push edi
call fcn.00416160
push dword [esi + 0x42ad54]
mov ebx, eax
call fcn.00416160
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004191c0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00419200
push edi
push ebx
call fcn.00419210
push 0x422ff8
push ebx
call fcn.00419210
push dword [esi + 0x42ad54]
push ebx
call fcn.00419210
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041a025
add esp, 0x2c
jmp 0x41891f
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x42ad54]
push dword [esi]
call fcn.00416160
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00412490
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41a025
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x42ba74], ebx
push esi
push edi
jne 0x41a0a5
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x41a0e0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x423cec
push edi
call esi
test eax, eax
mov dword [0x42ba74], eax
je 0x41a0e0
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x42ba78], eax
call esi
cmp dword [0x42b824], 2
mov dword [0x42ba7c], eax
jne 0x41a0a5
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x42ba84], eax
je 0x41a0a5
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42ba80], eax
mov eax, dword [0x42ba80]
test eax, eax
je 0x41a0ea
call eax
test eax, eax
je 0x41a0d1
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x42ba84]
test eax, eax
je 0x41a0d1
test byte [ebp - 8], 1
jne 0x41a0ea
cmp dword [0x42b830], 4
jb 0x41a0e4
or byte [ebp + 0x12], 0x20
jmp 0x41a109
xor eax, eax
jmp 0x41a119
or byte [ebp + 0x12], 4
jmp 0x41a109
mov eax, dword [0x42ba78]
test eax, eax
je 0x41a109
call eax
mov ebx, eax
test ebx, ebx
je 0x41a109
mov eax, dword [0x42ba7c]
test eax, eax
je 0x41a109
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x42ba74]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41d403
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.004191c0
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41d498
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x42b824]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x41d498
cmp eax, 1
je 0x41d4b0
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41d498
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x41d46d
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x41d494
xor eax, eax
inc eax
jmp 0x41d4cc
cmp esi, ebx
jae 0x41d49c
xor eax, eax
jmp 0x41d4cc
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x42b824]
jmp 0x41d4b2
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret