joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001d60
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x814
mov eax, dword [0x10024010]
xor eax, esp
mov dword [esp + 0x810], eax
cmp byte [0x1002664d], 0
xorps xmm0, xmm0
push ebx
push esi
push edi
movlpd qword [esp + 0x10], xmm0
je 0x10001e04
push dword [0x10026658]
mov byte [0x10024a30], 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [0x10026658]
test eax, eax
je 0x10001dc1
cmp eax, 0xffffffff
je 0x10001dc1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x10026658], 0
mov eax, dword [0x10026654]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x10001de2
cmp eax, 0xffffffff
je 0x10001de2
push eax
call esi
mov dword [0x10026654], 0
mov eax, dword [0x10026650]
test eax, eax
je 0x10001dfd
cmp eax, 0xffffffff
je 0x10001dfd
push eax
call esi
mov dword [0x10026650], 0
mov byte [0x1002664d], 0
call fcn.10001590
mov ebx, edx
mov edi, eax
or eax, ebx
jne 0x10001e19
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
push 0x400
lea eax, [esp + 0x41c]
push 0
push eax
call fcn.10008640
add esp, 0xc
mov dword [esp + 0x10], 0x200
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x41c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameW]
lea eax, [esp + 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x400
mov esi, eax
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.10008640
add esp, 0xc
lea eax, [esp + 0x18]
push esi
push str.SOFTWAREMicrosoftWindowsWindows_Error_ReportingLocalDumps_s
push 0x200
push eax
call fcn.10001050
lea ecx, [esp + 0x28]
add esp, 0x10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10001e97
sub ecx, edx
sar ecx, 1
je 0x10001f17
lea eax, [esp + 0xc]
push eax
push 0x2011f
push 0
lea eax, [esp + 0x24]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 2
je 0x10001f28
push 0
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
push 0
push 0x100
lea eax, [esp + 0x20]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyExW]
push dword [esp + 0xc]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x10001f0c
cmp ecx, 0xffffffff
je 0x10001f0c
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
cdq
mov ecx, eax
or eax, edx
je 0x10001f28
jmp 0x10001f1e
mov ecx, 0x57
xor edx, edx
mov eax, ecx
or eax, edx
je 0x10001f28
mov edi, ecx
mov ebx, edx
cmp byte [0x1002664c], 0
je 0x10001f79
call fcn.10004980
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call fcn.10004e50
push 0x10001780
push 0x10026648
call fcn.10004690
call fcn.100049e0
test eax, eax
je 0x10001f72
neg eax
cdq
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x810]
xor ecx, esp
call fcn.10006816
mov esp, ebp
pop ebp
ret
mov byte [0x1002664c], 0
mov ecx, dword [esp + 0x81c]
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
xor ecx, esp
call fcn.10006816
mov esp, ebp
pop ebp
ret
Function at 0x10002730
Capabilities:
Modify service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x10024010]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0xf003f
push 0
push 0
mov dword [ebp - 0x28], edx
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x1000277b
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x10002793
cmp edi, 0xffffffff
je 0x1000277b
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
xor edx, edx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10006816
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0
push eax
xorps xmm0, xmm0
push 1
push esi
movups xmmword [ebp - 0x20], xmm0
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1000281d
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x1000281d
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x24]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x10002816
mov eax, dword [ebp - 0x28]
cmp dword [ebx + 4], eax
je 0x10002816
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 3
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp esi, 0xffffffff
je 0x10002838
push esi
call ebx
cmp edi, 0xffffffff
je 0x10002840
push edi
call ebx
mov ecx, dword [ebp - 4]
xor eax, eax
pop ebx
pop edi
xor ecx, ebp
xor edx, edx
pop esi
call fcn.10006816
mov esp, ebp
pop ebp
ret
Function at 0x10002a80
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10024010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push esi
mov esi, dword [ebp + 0xc]
push edi
push eax
mov edi, edx
or edi, 0x2001f
push edi
push 0
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x10002add
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push edi
push 0
push 0
push 0
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10002b87
test esi, esi
jne 0x10002b12
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10002afd
cmp eax, 0xffffffff
je 0x10002afd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10006816
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 0
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x10], 4
push eax
push 0
push esi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
jne 0x10002b53
cmp dword [ebp - 8], 4
jne 0x10002b53
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 0x10]
je 0x10002b69
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push esi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10002b85
cmp eax, 0xffffffff
je 0x10002b85
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
cdq
pop ebx
call fcn.10006816
mov esp, ebp
pop ebp
ret
Function at 0x10002ba0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x10024010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x414]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edx
push ecx
or esi, 0x2001f
mov dword [ebp - 0x418], eax
push esi
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x10002c17
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x414]
push eax
push 0
push esi
push 0
push 0
push 0
push dword [ebp - 0x418]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10002d15
test edi, edi
jne 0x10002c52
push dword [ebp - 0x414]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x10002c3d
cmp eax, 0xffffffff
je 0x10002c3d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10006816
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [ebp - 0x404]
mov dword [ebp - 0x408], 1
push 0
push eax
call fcn.10008640
add esp, 0xc
mov dword [ebp - 0x40c], 0x200
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x408]
push eax
push 0
push edi
push dword [ebp - 0x414]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x10002cc1
cmp dword [ebp - 0x408], 1
jne 0x10002cc1
push ebx
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpW]
test eax, eax
je 0x10002cf1
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10002cc6
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push 1
push 0
push edi
push dword [ebp - 0x414]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
push dword [ebp - 0x414]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x10002d13
cmp eax, 0xffffffff
je 0x10002d13
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
cdq
pop ebx
call fcn.10006816
mov esp, ebp
pop ebp
ret
Function at 0x10002ed0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
sub eax, 0x10000
push eax
call fcn.100030a0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jbe 0x10002fad
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10002f1a
mov eax, dword [ebp - 4]
cmp eax, dword [0x10024004]
ja 0x10002f1a
mov ecx, dword [ebp - 4]
sub ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10002eea
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call fcn.10008640
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.dll_VirtualQuery
test eax, eax
jne 0x10002f3f
jmp 0x10002fad
cmp dword [ebp - 0x14], 0x10000
jne 0x10002f93
cmp dword [ebp - 0x18], 0x10000
jb 0x10002f93
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.dll_VirtualAlloc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10002f76
mov eax, dword [ebp - 8]
jmp 0x10002faf
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x10002f86
xor eax, eax
jmp 0x10002faf
mov eax, dword [ebp - 4]
sub eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10002fa8
mov ecx, dword [ebp - 0x20]
sub ecx, 0x10000
push ecx
call fcn.100030a0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10002eea
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10002fc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push eax
call fcn.100030d0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x10003095
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10003005
mov eax, dword [ebp - 4]
cmp eax, dword [0x10024004]
ja 0x10003005
mov ecx, dword [ebp - 4]
add ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10002fd5
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call fcn.10008640
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.dll_VirtualQuery
test eax, eax
jne 0x1000302a
jmp 0x10003095
cmp dword [ebp - 0x14], 0x10000
jne 0x1000307e
cmp dword [ebp - 0x18], 0x10000
jb 0x1000307e
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.dll_VirtualAlloc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10003061
mov eax, dword [ebp - 8]
jmp 0x10003097
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x10003071
xor eax, eax
jmp 0x10003097
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10003090
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x18]
push ecx
call fcn.100030d0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10002fd5
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10003100
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.100034f0
add esp, 0xc
mov dword [ebp - 4], 0
cmp dword [0x10024b0c], 0
jne 0x1000313d
cmp dword [0x10024b08], 0
je 0x1000313d
mov eax, dword [0x10024b08]
mov dword [0x10024b0c], eax
cmp dword [0x10024b0c], 0
je 0x100031ba
mov ecx, dword [0x10024b0c]
cmp dword [ecx + 8], 0
je 0x100031ba
mov edx, dword [0x10024b0c]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0x10]
jb 0x100031ba
mov ecx, dword [0x10024b0c]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0xc]
ja 0x100031ba
mov eax, dword [0x10024b0c]
mov ecx, dword [eax + 8]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jb 0x10003189
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jbe 0x10003190
xor eax, eax
jmp 0x100032d9
mov ecx, dword [0x10024b0c]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x40]
mov dword [ecx + 8], eax
push 0x48
push 0xcc
mov ecx, dword [ebp - 4]
push ecx
call fcn.10008640
add esp, 0xc
mov eax, dword [ebp - 4]
jmp 0x100032d9
mov edx, dword [0x10024b08]
mov dword [0x10024b0c], edx
jmp 0x100031d6
mov eax, dword [0x10024b0c]
mov ecx, dword [eax + 4]
mov dword [0x10024b0c], ecx
cmp dword [0x10024b0c], 0
je 0x10003216
cmp dword [0x10024b0c], 0
je 0x10003214
mov edx, dword [0x10024b0c]
cmp dword [edx + 8], 0
je 0x10003214
mov eax, dword [0x10024b0c]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 0x10]
jb 0x10003214
mov edx, dword [0x10024b0c]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0xc]
ja 0x10003214
jmp 0x1000316e
jmp 0x100031c8
mov ecx, dword [ebp + 8]
and ecx, 0xffff
mov edx, dword [ebp + 8]
sub edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.100032e0
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x100032d7
mov eax, dword [ebp - 0x18]
mov dword [0x10024b0c], eax
mov ecx, dword [0x10024b0c]
mov dword [ecx], 0x52727464
mov edx, dword [0x10024b0c]
mov dword [edx + 8], 0
mov eax, dword [0x10024b0c]
mov ecx, dword [0x10024b08]
mov dword [eax + 4], ecx
mov edx, dword [0x10024b0c]
mov dword [0x10024b08], edx
mov dword [ebp - 0x14], 0
mov eax, dword [0x10024b0c]
add eax, 0x48
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0x38c
jmp 0x100032a7
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 1
jle 0x100032c7
imul edx, dword [ebp - 8], 0x48
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
mov dword [eax + edx + 0x40], ecx
imul edx, dword [ebp - 8], 0x48
add edx, dword [ebp - 4]
mov dword [ebp - 0x14], edx
jmp 0x1000329e
mov eax, dword [0x10024b0c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 8], ecx
jmp 0x1000316e
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10004020
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x10024b08]
mov dword [ebp - 4], eax
jmp 0x10004039
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x10004060
lea eax, [ebp - 8]
push eax
push 0x40
push 0x10000
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x1000405e
call sub.KERNEL32.dll_GetLastError
jmp 0x10004062
jmp 0x10004030
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10004690
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], 0
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x10024b18], eax
je 0x100046b4
mov eax, 0x10dd
jmp 0x1000485c
cmp dword [0x10024b1c], 0
je 0x100046c7
mov eax, dword [0x10024b1c]
jmp 0x1000485c
cmp dword [ebp + 0xc], 0
jne 0x100046d7
mov eax, 0x57
jmp 0x1000485c
cmp dword [ebp + 8], 0
jne 0x100046e7
mov eax, 6
jmp 0x1000485c
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10004710
mov dword [ebp - 8], 6
mov ecx, dword [ebp - 8]
mov dword [0x10024b1c], ecx
mov edx, dword [ebp + 8]
mov dword [0x10024b20], edx
mov eax, dword [ebp - 8]
jmp 0x1000485c
push 0x18
call fcn.10006831
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000476b
mov dword [ebp - 8], 8
mov ecx, dword [ebp - 8]
mov dword [0x10024b1c], ecx
cmp dword [ebp - 4], 0
je 0x1000475a
mov edx, dword [ebp - 4]
mov dword [ebp - 0x20], edx
push 0x18
mov eax, dword [ebp - 0x20]
push eax
call fcn.10006bc4
add esp, 8
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
mov dword [0x10024b20], ecx
mov eax, dword [ebp - 8]
jmp 0x1000485c
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.10004670
mov dword [ebp - 0x10], eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.10004670
mov dword [ebp + 0xc], eax
mov edx, dword [ebp - 0x10]
movzx eax, byte [edx + 0x36]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x40]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0xc], 0
je 0x100047ab
cmp dword [ebp - 0xc], 0x1e
jbe 0x100047c7
mov dword [ebp - 8], 9
cmp dword [0x10024b10], 0
je 0x100047c2
jmp 0x10004739
jmp 0x10004730
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x44]
cmp ecx, dword [ebp + 0xc]
je 0x100047ee
mov dword [ebp - 8], 9
cmp dword [0x10024b10], 0
je 0x100047e9
jmp 0x10004739
jmp 0x10004730
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x18]
push edx
push 0x40
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x10004819
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 8], eax
jmp 0x10004730
mov edx, dword [ebp - 4]
mov dword [edx + 4], 1
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 4]
mov eax, dword [0x10024b28]
mov dword [edx], eax
mov ecx, dword [ebp - 4]
mov dword [0x10024b28], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret 8
Function at 0x10004870
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x10024b18], eax
je 0x1000488d
mov eax, 0x10dd
jmp 0x10004970
mov eax, dword [0x10024b28]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x1000490c
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
movzx eax, byte [edx + 0x36]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call sub.KERNEL32.dll_VirtualProtect
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
jne 0x100048e8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x10], 0
je 0x100048e8
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
push eax
call fcn.10003580
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
push 0x18
mov edx, dword [ebp - 0xc]
push edx
call fcn.10006bc4
add esp, 8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x10004895
mov dword [0x10024b28], 0
call fcn.10003e60
mov ecx, dword [0x10024b24]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x1000495a
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
call sub.KERNEL32.dll_ResumeThread
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
push 8
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.10006bc4
add esp, 8
mov edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
jmp 0x10004924
mov dword [0x10024b24], 0
mov dword [0x10024b18], 0
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10004e50
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [0x10024b1c], 0
je 0x10004e69
mov eax, dword [0x10024b1c]
jmp 0x10004f08
call sub.KERNEL32.dll_GetCurrentThread
cmp dword [ebp + 8], eax
jne 0x10004e7a
xor eax, eax
jmp 0x10004f08
push 8
call fcn.10006831
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x10004ed2
mov dword [ebp - 8], 8
cmp dword [ebp - 4], 0
je 0x10004ebb
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
push 8
mov edx, dword [ebp - 0x10]
push edx
call fcn.10006bc4
add esp, 8
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
mov dword [0x10024b1c], eax
mov dword [0x10024b20], 0
mov eax, dword [ebp - 8]
jmp 0x10004f08
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.dll_SuspendThread
cmp eax, 0xffffffff
jne 0x10004eea
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 8], eax
jmp 0x10004e9a
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [0x10024b24]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
mov dword [0x10024b24], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x1001323d
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.10012eba
Function at 0x401000
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov edx, dword [ebp + 0xc]
add edx, 4
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
push 0
call fcn.004011b6
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne case.0x401057.2
mov edx, dword [0x407410]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
sub eax, 2
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x14
ja case.0x401057.2
mov edx, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [edx + 0x401081]
jmp dword [ecx*4 + 0x401075]
mov dword [ebp - 4], 0xc0000017
jmp case.0x401057.2
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x401e9d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4070e0
cmp edx, dword [eax]
je 0x401ebf
add eax, 8
inc ecx
cmp eax, 0x407170
jl 0x401eb0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4070e0]
jne 0x401fed
mov eax, dword [0x407464]
cmp eax, 1
je 0x401fc7
test eax, eax
jne 0x401ef0
cmp dword [0x407034], 1
je 0x401fc7
cmp edx, 0xfc
je 0x401fed
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401f27
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00402050
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004021a0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x401f6a
lea eax, [ebp - 0x1a4]
push eax
call fcn.004021a0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4063cc
push edi
call fcn.00403ca0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00402050
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00402060
lea eax, [ebp - 0xa0]
push 0x4063ac
push eax
call fcn.00402060
push dword [esi + 0x4070e4]
lea eax, [ebp - 0xa0]
push eax
call fcn.00402060
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00403c11
add esp, 0x2c
pop edi
jmp 0x401fed
lea eax, [ebp + 8]
lea esi, [esi + 0x4070e4]
push 0
push eax
push dword [esi]
call fcn.004021a0
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]
pop esi
leave
ret

Function at 0x403f7c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x403f9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404f63
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x403fbd
test byte [esp + 8], 2
je 0x403fbd
mov dword [0x407410], 0xd
mov dword [0x407414], 5
jmp 0x403f98
xor eax, eax
ret