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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
push ebx
push esi
push edi
push 5
pop ecx
mov esi, 0x404b8c
lea edi, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 5
pop ecx
mov esi, 0x404b74
lea edi, [ebp - 0x48]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x404b60
lea edi, [ebp - 0x1c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ebx, dword [ebp + 8]
movsw word es:[edi], word [esi]
mov esi, 0x404b4c
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push ebx
push 0x404b2c
movsb byte es:[edi], byte [esi]
xor esi, esi
lea eax, [ebp - 0xc4]
push 0x64
push eax
mov dword [0x4298cc], esi
mov dword [0x4298d0], esi
mov dword [0x4298d4], esi
call fcn.00418489
add esp, 0x10
test eax, eax
jl 0x418685
lea eax, [ebp + 8]
push eax
push 0x20019
push esi
lea eax, [ebp - 0xc4]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41868e
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 4]
push eax
push 0x4298cc
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x60]
push eax
push dword [ebp + 8]
mov dword [ebp - 4], 4
call edi
test eax, eax
je 0x4185af
mov dword [0x4298cc], esi
lea eax, [ebp - 4]
push eax
push 0x4298d0
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 8]
call edi
test eax, eax
je 0x4185d0
mov dword [0x4298d0], esi
lea eax, [ebp - 4]
push eax
push 0x4298d4
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
call edi
test eax, eax
je 0x4185f1
mov dword [0x4298d4], esi
lea eax, [ebp - 4]
push eax
push 0x4298d8
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call edi
test eax, eax
je 0x418616
mov dword [0x4298d8], 0xffff0000
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x4298cc], esi
jne 0x41863f
cmp dword [0x4298d0], esi
jne 0x41864f
cmp dword [0x4298d4], esi
jne 0x41864f
xor eax, eax
inc eax
jmp 0x4186c3
cmp dword [0x4298d0], esi
jne 0x41864f
cmp dword [0x4298d4], esi
je 0x418674
push ebx
push 0x404b28
push 0x64
push 0x429868
call fcn.00418489
add esp, 0x10
test eax, eax
jl 0x418685
push esi
push ebx
call sub.rtutils.dll_TraceRegisterExW
mov dword [0x427e40], eax
cmp dword [0x4298cc], esi
jne 0x418689
cmp dword [0x427e40], 0xffffffff
jne 0x418689
xor eax, eax
jmp 0x4186c3
xor eax, eax
inc eax
jmp 0x4186be
push ebx
push 0x404b28
push 0x64
push 0x429868
call fcn.00418489
add esp, 0x10
test eax, eax
jl 0x418685
push esi
push ebx
call sub.rtutils.dll_TraceRegisterExW
mov ecx, eax
xor eax, eax
inc eax
cmp ecx, 0xffffffff
mov dword [0x427e40], ecx
je 0x4186c3
mov dword [0x4298dc], eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4186ca
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
xor esi, esi
cmp dword [0x4298cc], esi
push edi
mov edi, dword [ebp + 8]
mov ebx, 0x201
jbe 0x4187f1
test dword [0x4298d8], edi
je 0x4187f1
cmp edi, 0x10002
je 0x418736
cmp edi, 0x20002
je 0x418733
cmp edi, 0x40002
je 0x41872f
cmp edi, 0x80002
je 0x41872a
xor eax, eax
cmp edi, 0x100002
setne al
add eax, 4
mov esi, eax
jmp 0x418736
push 3
pop esi
jmp 0x418736
push 2
jmp 0x41872c
xor esi, esi
inc esi
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push dword [esi*4 + 0x427e44]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
movzx eax, word [ebp - 6]
push eax
movzx eax, word [ebp - 8]
push eax
movzx eax, word [ebp - 0xa]
push eax
movzx eax, word [ebp - 0xc]
push eax
push 0x429868
push 0x404bec
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.00418489
add esp, 0x28
test eax, eax
jl 0x418889
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 0x218]
push eax
call fcn.00418409
test eax, eax
jl 0x418889
mov eax, dword [ebp - 4]
cmp eax, ebx
jae 0x418889
lea ecx, [ebp + 0x10]
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
sub ecx, eax
push ecx
lea eax, [ebp + eax - 0x218]
push eax
call fcn.0041846e
test eax, eax
jge 0x4187d2
cmp eax, 0x7a
jne 0x418889
push 0x404be8
push ebx
lea eax, [ebp - 0x218]
push eax
call fcn.004184b0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [0x427e40], 0xffffffff
je 0x418889
xor eax, eax
cmp dword [0x4298d0], eax
ja 0x418810
cmp dword [0x4298d4], eax
jbe 0x418889
cmp edi, 0x10002
je 0x41884c
cmp edi, 0x20002
je 0x418849
cmp edi, 0x40002
je 0x418845
cmp edi, 0x80002
je 0x418840
xor eax, eax
cmp edi, 0x100002
setne al
add eax, 4
jmp 0x41884c
push 3
pop eax
jmp 0x41884c
push 2
jmp 0x418842
xor eax, eax
inc eax
push dword [ebp + 0xc]
push dword [eax*4 + 0x427e44]
lea eax, [ebp - 0x218]
push 0x404be0
push ebx
push eax
call fcn.00418489
add esp, 0x14
test eax, eax
jl 0x418889
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x218]
push eax
or edi, 4
push edi
push dword [0x427e40]
call sub.rtutils.dll_TraceVprintfExA
pop edi
pop esi
pop ebx
leave
ret
Function at 0x420b47
Capabilities:
Create thread

Disassembly:
mov eax, 0x42524d
call fcn.004167f0
push ecx
push ecx
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x4298dc], edi
mov esi, ecx
mov ebx, 0x80002
je 0x420b74
push 0x40bec8
push ebx
call fcn.004186ca
pop ecx
pop ecx
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x30], edi
mov dword [ebp - 4], edi
jne 0x420bf4
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, edi
mov dword [esi + 0x3c], eax
jne 0x420bb7
cmp dword [0x4298dc], edi
je 0x420bb0
push 0x40bea8
push 0x10002
call fcn.004186ca
pop ecx
pop ecx
mov edi, 0x80004005
jmp 0x420c0c
lea eax, [ebp - 0x14]
push eax
push edi
push esi
push 0x420b3b
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [esi + 0x40], eax
jne 0x420bf4
cmp dword [0x4298dc], edi
je 0x420bb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40be8c
push 0x10002
call fcn.004186ca
add esp, 0xc
jmp 0x420bb0
inc dword [esi + 0x30]
cmp dword [0x4298dc], edi
je 0x420c0c
push 0x40be6c
push ebx
call fcn.004186ca
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x4011c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x818
push 0x94
lea eax, [esp + 0x14]
push 0
push eax
call fcn.00403590
add esp, 0xc
mov dword [esp + 8], 0x9c
mov dword [esp + 0xc], 6
push 3
push 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push 2
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
test eax, eax
je 0x40125e
lea eax, [esp]
push eax
push 0
push 0
push 0x4182dc
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x4012b4
push dword [esp]
lea ecx, [esp + 0xc]
call fcn.00401e60
mov edx, dword [esp + 0x81c]
mov ecx, dword [eax + 0x404]
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x401240
lea ecx, [esp + 8]
call fcn.00401f00
add esp, 0x818
ret
lea eax, [esp + 8]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x4012b4
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x414]
call fcn.00401e60
mov edx, dword [esp + 0x81c]
mov ecx, dword [eax + 0x404]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x401293
lea ecx, [esp + 0x410]
call fcn.00401f00
add esp, 0x818
ret
push ebx
push esi
push edi
push str.APPDATA
call fcn.00405a47
add esp, 4
test eax, eax
je 0x401364
push eax
lea ecx, [esp + 0x420]
call fcn.00401e60
or ecx, 0xffffffff
mov edx, dword [eax + 0x404]
test edx, edx
jne 0x4012ea
xor eax, eax
jmp 0x401315
mov eax, edx
nop dword [eax]
cmp byte [eax], 0
je 0x401313
inc eax
cmp byte [eax], 0
je 0x401313
inc eax
cmp byte [eax], 0
je 0x401313
inc eax
cmp byte [eax], 0
je 0x401313
inc eax
cmp byte [eax], 0
je 0x401313
inc eax
sub ecx, 5
jne 0x4012f0
sub eax, edx
mov ebx, 0x1ff
cmp eax, ebx
cmovb ebx, eax
mov eax, ebx
cmp ebx, 0x200
jbe 0x40132e
mov eax, 0x200
mov edi, dword [esp + 0x828]
mov ecx, edi
lea esi, [eax + edi]
cmp edi, esi
je 0x40134a
sub edx, edi
mov al, byte [edx + ecx]
mov byte [ecx], al
inc ecx
cmp ecx, esi
jne 0x401340
lea ecx, [esp + 0x41c]
mov byte [ebx + edi], 0
call fcn.00401f00
pop edi
pop esi
pop ebx
add esp, 0x818
ret
or ecx, 0xffffffff
mov eax, 0x4181c0
nop dword [eax]
cmp byte [eax], 0
je 0x401393
inc eax
cmp byte [eax], 0
je 0x401393
inc eax
cmp byte [eax], 0
je 0x401393
inc eax
cmp byte [eax], 0
je 0x401393
inc eax
cmp byte [eax], 0
je 0x401393
inc eax
sub ecx, 5
jne 0x401370
sub eax, 0x4181c0
mov ebx, 0x1ff
cmp eax, ebx
cmovb ebx, eax
mov eax, ebx
cmp ebx, 0x200
jbe 0x4013b1
mov eax, 0x200
mov esi, dword [esp + 0x828]
mov ecx, esi
lea edi, [eax + esi]
cmp esi, edi
je 0x4013d2
mov edx, 0x4181c0
sub edx, esi
mov al, byte [edx + ecx]
mov byte [ecx], al
inc ecx
cmp ecx, edi
jne 0x4013c8
pop edi
mov byte [ebx + esi], 0
pop esi
pop ebx
add esp, 0x818
ret
Function at 0x401780
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x2008
call fcn.00402890
mov eax, dword [esp + 0x2010]
push esi
push dword [eax]
lea eax, [esp + 0x10]
push 0
push dword [esp + 0x2018]
push 0x2000
push eax
call fcn.00401840
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 2
push ecx
call fcn.00407c10
add esp, 0x1c
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp byte [0x420990], 0
mov esi, eax
jne 0x4017fe
lea eax, [esp + 4]
mov byte [0x420990], 1
push eax
push esi
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov eax, dword [esp + 4]
or eax, 4
push eax
push esi
mov dword [esp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov dword [esp + 8], 0
cmp esi, 0xffffffff
je 0x40182f
lea ecx, [esp + 0xc]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401812
push 0
lea eax, [esp + 0xc]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
add esp, 0x2008
ret
Function at 0x402d85
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402dc4
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x402dc4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402dc4
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x402dc4
cmp dword [ecx + 0x74], 0xe
jbe 0x402dc4
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x40d3ca
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x40d467
push ebx
push esi
call fcn.0040d393
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040d327
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40d414
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40d466
push edi
push eax
call fcn.0040ad77
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40d434
call fcn.0040a1f9
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40d465
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040d327
add esp, 0x20
test eax, eax
jne 0x40d453
push edi
call fcn.0040a1f9
jmp 0x40d45b
push ebx
call fcn.0040a1f9
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x40d46a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x40d47b
pop esi
ret
push ebx
push edi
push esi
call fcn.0040d393
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0040ad77
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x40d4a3
push ebx
push esi
push edi
call fcn.004036f0
add esp, 0xc
push 0
call fcn.0040a1f9
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x40dbfd
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040d718

Function at 0x40e9f1
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41a5f0
push 0x41a5e8
push str.FlsAlloc
push 0x1f
call fcn.0040e8b0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40ea25
push dword [ebp + 8]
mov ecx, esi
call dword [0x418164]
call esi
jmp 0x40ea2b
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40ea6f
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41a600
push 0x41a5f8
push str.FlsGetValue
push 0x21
call fcn.0040e8b0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40eaa6
push dword [ebp + 8]
mov ecx, esi
call dword [0x418164]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40eaae
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41a608
push 0x41a600
push str.FlsSetValue
push 0x22
call fcn.0040e8b0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40eae8
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x418164]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x413d81
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00413cfd
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x413ef0
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x413ef0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x413ea5
jg 0x413ddd
test eax, eax
je 0x413e9b
push 1
push 0x1000
call fcn.0040bee7
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x413e00
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x413e92
push 0x8000
push ebx
call fcn.00408ac7
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x413e29
jg 0x413e24
cmp ecx, 0x1000
jb 0x413e29
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00410f78
add esp, 0x10
cmp eax, 0xffffffff
je 0x413e6e
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x413e24
jl 0x413e55
test ecx, ecx
jne 0x413e16
push dword [ebp - 0xc]
push ebx
call fcn.00408ac7
push esi
call fcn.0040a1f9
add esp, 0xc
xor ebx, ebx
jmp 0x413efe
cmp byte [edi + 0x24], 0
je 0x413e85
cmp dword [edi + 0x20], 5
jne 0x413e85
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x413e90
mov ebx, dword [edi + 0x18]
jmp 0x413e92
xor ebx, ebx
push esi
call fcn.0040a1f9
pop ecx
jmp 0x413efe
test ecx, ecx
jg 0x413e67
jl 0x413ea5
test eax, eax
jae 0x413e67
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00414802
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x413ec5
cmp byte [edi + 0x1c], 0
je 0x413e67
jmp 0x413ef6
push ebx
call fcn.0040dfd2
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x413e67
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x413efe
cmp byte [edi + 0x1c], 0
je 0x413efb
mov ebx, dword [edi + 0x18]
jmp 0x413efe
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00414802
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x413f18
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x4210a0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413f58
cmp byte [ebx], 0xa
jne 0x413f58
or byte [edi + eax + 0x28], 4
jmp 0x413f5d
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x41405c
mov dl, byte [eax]
cmp dl, 0x1a
je 0x41403f
inc eax
cmp dl, 0xd
je 0x413f89
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x413faf
cmp eax, ecx
jae 0x413fbd
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x413f71
jmp 0x41405c
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41403a
cmp dword [ebp - 0x10], 0
je 0x41403a
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4210a0]
test byte [eax + edi + 0x28], 0x48
je 0x414014
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x413fff
mov byte [esi], dl
jmp 0x414010
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4210a0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41405c
cmp byte [ebp - 1], 0xa
jne 0x414023
cmp esi, ebx
jne 0x414023
mov byte [esi], 0xa
jmp 0x41405b
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414802
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41405c
mov byte [esi], 0xd
jmp 0x41405b
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4210a0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x414059
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41405c
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x414065
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x4210a0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4140ab
cmp word [ebx], dx
jne 0x4140ab
or byte [eax + edi + 0x28], 4
jmp 0x4140b0
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x414213
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x4141f3
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4140f1
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x414127
cmp eax, edx
jae 0x414135
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4140cc
jmp 0x414213
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4141ee
cmp dword [ebp - 0x18], 0
je 0x4141ee
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4210a0]
test byte [eax + edi + 0x28], 0x48
je 0x4141c4
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x414188
mov word [esi], cx
jmp 0x4141bf
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4210a0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4210a0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4210a0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x414213
pop eax
cmp word [ebp - 4], ax
jne 0x4141d4
cmp esi, ebx
jne 0x4141d4
mov word [esi], ax
jmp 0x414210
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00414802
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x414213
push 0xd
pop eax
jmp 0x4141cf
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4210a0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x41420d
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x414213
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x416cc0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x416ced
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x416ced
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401330
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x34
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
test byte [0x404020], 8
jne 0x401410
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
lea edi, [ebp - 0x10]
lea esi, [ebp - 0x14]
mov dword [esp + 0x14], edi
mov dword [esp], ebx
mov ebx, dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call ebx
xor edx, edx
sub esp, 0x18
test eax, eax
jne 0x401402
mov ecx, dword [ebp - 0x10]
mov dword [esp + 4], 0
add ecx, 4
mov edx, ecx
mov dword [ebp - 0x28], ecx
mov dword [esp + 8], edx
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp - 0x20], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
sub esp, 0x18
test eax, eax
jne 0x401440
mov eax, dword [ebp - 0x28]
xor ecx, ecx
xor ebx, ebx
and eax, 0xfffffffe
mov word [edx + eax - 2], cx
mov word [edx + eax - 4], bx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], 0x405017
mov dword [esp + 8], str.GetRegValue
mov dword [esp + 4], 0x404020
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40134c
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
xor edx, edx
sub esp, 0xc
jmp 0x401402
Function at 0x401e10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x401e68
cmp byte [esi + ebx - 1], 0xa
je 0x401e3c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x4040f8], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
pop ebx
pop esi
pop ebp
ret