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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 4
mov dword [ebp - 8], 4
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x18]
push eax
push 0xf003f
push 0
push 0x42d3f8
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40dc8c
xor eax, eax
jmp 0x40dd05
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x14]
push edx
push 0
push 0
push 0x42d430
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40dcb6
cmp dword [ebp - 0x14], 1
je 0x40dcc4
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x40dd05
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push str.MediaPortbase
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x10], 0
je 0x40dcf6
xor eax, eax
jmp 0x40dd05
mov eax, dword [ebp + 8]
mov cx, word [ebp - 0xc]
mov word [eax], cx
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x40dd74
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], 4
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x10]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesNetUcardParameters
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40ddb3
xor eax, eax
jmp 0x40de4e
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0
push 0
push str.IsIPValid
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40dddd
cmp dword [ebp - 0xc], 1
je 0x40ddeb
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x40de4e
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
push 0
push 0
push str.MediaIpaddress
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
je 0x40de1d
xor eax, eax
jmp 0x40de4e
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x40de39
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040daca
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x40de4e
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call sub.WS2_32.dll_ntohl
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x411749
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push 0x60
push 0x41a3c8
call fcn.00413140
and dword [ebp - 4], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
or dword [ebp - 4], 0xffffffff
mov ebx, 0x94
push ebx
push 0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x411900
mov dword [esi], ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push esi
push 0
test eax, eax
jne 0x4117a6
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x411900
mov eax, dword [esi + 0x10]
mov dword [0x4315ec], eax
mov eax, dword [esi + 4]
mov dword [0x4315f8], eax
mov eax, dword [esi + 8]
mov dword [0x4315fc], eax
mov eax, dword [esi + 0xc]
and eax, 0x7fff
mov dword [0x4315f0], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0x4315ec], 2
je 0x4117e4
or byte [0x4315f1], 0x80
mov eax, dword [0x4315f8]
shl eax, 8
add eax, dword [0x4315fc]
mov dword [0x4315f4], eax
call fcn.004116ed
mov dword [ebp - 0x1c], eax
xor ebx, ebx
inc ebx
push ebx
call fcn.00414634
pop ecx
test eax, eax
jne 0x411815
push 0x1c
call fcn.004116c9
pop ecx
call fcn.00414512
test eax, eax
jne 0x411826
push 0x10
call fcn.004116c9
pop ecx
mov dword [ebp - 4], ebx
call fcn.004135db
test eax, eax
jge 0x41183a
push 0x1b
call fcn.004116a4
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4398b8], eax
call fcn.00414201
mov dword [0x4315d8], eax
call fcn.00414160
test eax, eax
jge 0x411860
push 8
call fcn.004116a4
pop ecx
call fcn.00413f16
test eax, eax
jge 0x411871
push 9
call fcn.004116a4
pop ecx
call fcn.00411e77
mov dword [ebp - 0x28], eax
test eax, eax
je 0x411884
push eax
call fcn.004116a4
pop ecx
call fcn.00413ead
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], bl
je 0x411897
movzx eax, word [ebp - 0x40]
jmp 0x41189a
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push 0
push 0x400000
call fcn.004017c3
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x1c], 0
jne 0x4118bb
push esi
call fcn.00411f8c
call fcn.00411fae
jmp 0x4118ed
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x411905
mov eax, 0xff
call fcn.0041317b
ret
Function at 0x413b98
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, dword [eax*8 + 0x42dd98]
je 0x413bb0
inc eax
cmp eax, 0x12
jb 0x413ba1
push esi
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x42dd98]
mov dword [ebp + 8], esi
jne 0x413cf6
mov eax, dword [0x4315e0]
cmp eax, 1
push ebx
je 0x413cc6
test eax, eax
jne 0x413be5
cmp dword [0x42d964], 1
je 0x413cc6
cmp ecx, 0xfc
je 0x413cf5
push edi
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
mov edi, 0x431640
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x43165a
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x43175e], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x413c33
push 5
pop ecx
mov esi, str._program_name_unknown_
mov edi, 0x43165a
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413c38
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x413c6b
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413c4c
sub eax, edx
push 3
lea eax, [eax + 0x43161f]
push 0x41a83c
push eax
call fcn.00411580
add esp, 0xc
mov edx, 0x431640
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x413c73
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x42dd9c]
mov esi, 0x41a838
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413c8e
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x413c9a
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0041620a
add esp, 0xc
pop edi
jmp 0x413cf5
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x413cf5
mov esi, dword [esi + 0x42dd9c]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x413cdd
push 0
sub ecx, edx
lea edx, [ebp - 4]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
pop esi
leave
ret
Function at 0x415351
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x41536f
xor eax, eax
jmp 0x4154dd
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 + 0x438780]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4153a2
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00417070
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x415474
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x4154ac
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x4153fd
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4153ee
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x4153d1
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41543d
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x415446
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x4153c2
jmp 0x415448
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x4154d8
cmp dword [ebp - 4], edi
je 0x4154ac
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x4154a1
call fcn.00413295
mov dword [eax], 9
call fcn.004132a8
mov dword [eax], esi
jmp 0x4154d3
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415496
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x415448
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x415448
push dword [ebp - 4]
call fcn.004132bb
pop ecx
jmp 0x4154d3
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4154c1
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4154c1
xor eax, eax
jmp 0x4154db
call fcn.00413295
mov dword [eax], 0x1c
call fcn.004132a8
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4154db
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x415830
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x41585e
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x415865
cmp ebx, dword [eax + 4]
jae 0x415865
xor eax, eax
jmp 0x415a55
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x415876
xor eax, eax
inc eax
jmp 0x415a54
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41588c
cmp ecx, edx
jae 0x4159d1
cmp dword [eax + 4], 0
je 0x415895
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x41587d
cmp dword [ebp + 8], 0
je 0x4158b7
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4159d1
cmp eax, esi
jae 0x4159d1
mov eax, dword [0x431be0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4158dc
cmp dword [esi*4 + 0x431be8], edi
je 0x4159d5
inc esi
cmp esi, eax
jl 0x4158ca
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x415a51
cmp dword [ebp - 8], 0x1000000
jne 0x415a51
test byte [ebp - 0xc], 0xcc
je 0x41595a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x415a51
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x415a51
cmp word [eax + 0x18], 0x10b
jne 0x415a51
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x415a51
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41595a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41595a
test byte [ecx + 0x27], 0x80
jne 0x4159d1
push 1
push 0x431c28
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41586e
mov ecx, dword [0x431be0]
test ecx, ecx
mov edx, ecx
jle 0x41598e
lea eax, [ecx*4 + 0x431be4]
cmp dword [eax], edi
je 0x41598e
dec edx
sub eax, 4
test edx, edx
jg 0x415982
test edx, edx
jne 0x4159bf
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41599b
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4159b3
lea eax, [edx*4 + 0x431be8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4159a1
cmp ecx, 0x10
jge 0x4159bf
inc ecx
mov dword [0x431be0], ecx
push 0
push 0x431c28
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41586e
xor eax, eax
jmp 0x415a54
test esi, esi
jle 0x41586e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x431c28
call ebx
test eax, eax
jne 0x41586e
cmp dword [esi*4 + 0x431be8], edi
je 0x415a2b
mov eax, dword [0x431be0]
lea esi, [eax - 1]
test esi, esi
jl 0x415a19
cmp dword [esi*4 + 0x431be8], edi
je 0x415a15
dec esi
jns 0x415a09
test esi, esi
jge 0x415a29
cmp eax, 0x10
jge 0x415a24
inc eax
mov dword [0x431be0], eax
lea esi, [eax - 1]
jmp 0x415a2b
je 0x415a43
xor ecx, ecx
test esi, esi
jl 0x415a43
lea eax, [ecx*4 + 0x431be8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x415a31
push 0
push 0x431c28
call ebx
jmp 0x41586e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41620a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x431c34], ebx
push esi
push edi
jne 0x41628a
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4162c5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41b044
push edi
call esi
test eax, eax
mov dword [0x431c34], eax
je 0x4162c5
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x431c38], eax
call esi
cmp dword [0x4315ec], 2
mov dword [0x431c3c], eax
jne 0x41628a
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x431c44], eax
je 0x41628a
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x431c40], eax
mov eax, dword [0x431c40]
test eax, eax
je 0x4162cf
call eax
test eax, eax
je 0x4162b6
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x431c44]
test eax, eax
je 0x4162b6
test byte [ebp - 8], 1
jne 0x4162cf
cmp dword [0x4315f8], 4
jb 0x4162c9
or byte [ebp + 0x12], 0x20
jmp 0x4162ee
xor eax, eax
jmp 0x4162fe
or byte [ebp + 0x12], 4
jmp 0x4162ee
mov eax, dword [0x431c38]
test eax, eax
je 0x4162ee
call eax
mov ebx, eax
test ebx, ebx
je 0x4162ee
mov eax, dword [0x431c3c]
test eax, eax
je 0x4162ee
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x431c34]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4171bf
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
call fcn.004137ef
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x417304
push 2
push esi
push dword [ebp + 8]
call fcn.004137ef
add esp, 0xc
cmp eax, ebx
je 0x417304
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4172a7
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x417238
call fcn.00413295
mov dword [eax], 0xc
or esi, 0xffffffff
jmp 0x4172ef
push 0x8000
push dword [ebp + 8]
call fcn.00417c6f
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp edi, ebx
mov eax, ebx
jge 0x417252
mov eax, edi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.00415351
add esp, 0xc
cmp eax, 0xffffffff
je 0x41726e
sub edi, eax
test edi, edi
jg 0x41724a
jmp 0x417286
call fcn.004132a8
cmp dword [eax], 5
jne 0x417283
call fcn.00413295
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00417c6f
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4172ef
jge 0x4172ef
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004137ef
push dword [ebp + 8]
call fcn.00415b54
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x4172ef
call fcn.00413295
mov dword [eax], 0xd
call fcn.004132a8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.004137ef
add esp, 0xc
mov eax, esi
pop edi
jmp 0x417306
mov eax, ebx
pop esi
pop ebx
leave
ret
Function at 0x41730a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x4174de
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x438780]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4174de
test cl, 0x48
je 0x417375
cmp byte [eax + 5], 0xa
je 0x417375
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4173c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4173af
call fcn.00413295
mov dword [eax], 9
call fcn.004132a8
mov dword [eax], esi
jmp 0x4173bf
cmp eax, 0x6d
je 0x4174de
push eax
call fcn.004132bb
pop ecx
or eax, 0xffffffff
jmp 0x4174e0
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4174d9
test eax, eax
je 0x4173ee
cmp byte [ebx], 0xa
jne 0x4173ee
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x4173f7
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x4174d3
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4174c3
cmp al, 0xd
je 0x417429
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4174b5
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x417443
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x41743e
add dword [ebp + 0x10], 2
jmp 0x417497
mov dword [ebp + 0x10], eax
jmp 0x4174b1
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41746b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4174b1
cmp dword [ebp - 0xc], 0
je 0x4174b1
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x41748c
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x417497
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4174b4
cmp ebx, dword [ebp + 0xc]
jne 0x41749c
cmp byte [ebp - 1], 0xa
jne 0x41749c
mov byte [ebx], 0xa
jmp 0x4174b4
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004137ef
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4174b5
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41740d
jmp 0x4174d3
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4174d3
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x4174e0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4178fe
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004120d0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x417999
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4315ec]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x417999
cmp eax, 1
je 0x4179ba
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x417999
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x417966
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x417995
xor eax, eax
inc eax
jmp 0x4179d9
cmp edi, eax
jae 0x41799d
xor eax, eax
jmp 0x4179d9
cmp eax, esi
jae 0x4179a4
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4315ec]
jmp 0x4179bd
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407e40
Capabilities:
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x46a36b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
push ebx
push ebp
mov ebp, ecx
lea ecx, [esp + 8]
lea eax, [ebp + 0x40]
push eax
call fcn.0045f26f
mov ecx, dword [esp + 8]
mov dword [esp + 0x190], 0
mov eax, dword [ecx - 8]
test eax, eax
je 0x407ec2
lea edx, [esp + 0x10]
push 1
push edx
lea ecx, [esp + 0x10]
call fcn.0045cc87
mov eax, dword [eax]
push 0x4861d0
push eax
call fcn.0044f464
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
setne bl
call fcn.0045f4fa
test bl, bl
je 0x407ec2
push 0x4861d0
lea ecx, [esp + 0xc]
call fcn.0045f88a
push 0x489d18
lea ecx, [esp + 0xc]
call fcn.0045f88a
mov ecx, dword [esp + 8]
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x407efe
lea ecx, [esp + 8]
mov dword [esp + 0x190], eax
call fcn.0045f4fa
jmp 0x407fc9
push esi
mov esi, dword [esp + 0x19c]
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, 0x23
test byte [esp + 0x50], 0x10
je 0x407f82
lea edx, [esp + 0x7c]
push 0x489d14
push edx
call fcn.0044f464
add esp, 8
test eax, eax
je 0x407f82
lea eax, [esp + 0x7c]
push 0x489d10
push eax
call fcn.0044f464
add esp, 8
test eax, eax
je 0x407f82
mov eax, dword [ebp + 0x1c]
lea edx, [esp + 0x1c]
push edx
push 0
lea ecx, [esp + 0x84]
push 0x1100
push eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], 0xffff0003
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 1
mov dword [esp + 0x44], ecx
mov dword [esp + 0x34], ebx
call edi
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x50]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x407f12
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp + 0x1c]
push esi
push 2
push 0x1102
push ecx
call edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x198], 0xffffffff
call fcn.0045f4fa
pop edi
pop esi
mov ecx, dword [esp + 0x188]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18c
ret 4

Function at 0x4087c0
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x408822
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc