joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405f50
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 0x405f7e
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 0x405f85
cmp ebx, dword [eax + 4]
jae 0x405f85
xor eax, eax
jmp 0x406175
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x405f96
xor eax, eax
inc eax
jmp 0x406174
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x405fac
cmp ecx, edx
jae 0x4060f1
cmp dword [eax + 4], 0
je 0x405fb5
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x405f9d
cmp dword [ebp + 8], 0
je 0x405fd7
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4060f1
cmp eax, esi
jae 0x4060f1
mov eax, dword [0x41f910]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x405ffc
cmp dword [esi*4 + 0x41f918], edi
je 0x4060f5
inc esi
cmp esi, eax
jl 0x405fea
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406171
cmp dword [ebp - 8], 0x1000000
jne 0x406171
test byte [ebp - 0xc], 0xcc
je 0x40607a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x406171
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x406171
cmp word [eax + 0x18], 0x10b
jne 0x406171
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x406171
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40607a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40607a
test byte [ecx + 0x27], 0x80
jne 0x4060f1
push 1
push 0x41f958
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x405f8e
mov ecx, dword [0x41f910]
test ecx, ecx
mov edx, ecx
jle 0x4060ae
lea eax, [ecx*4 + 0x41f914]
cmp dword [eax], edi
je 0x4060ae
dec edx
sub eax, 4
test edx, edx
jg 0x4060a2
test edx, edx
jne 0x4060df
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4060bb
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4060d3
lea eax, [edx*4 + 0x41f918]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4060c1
cmp ecx, 0x10
jge 0x4060df
inc ecx
mov dword [0x41f910], ecx
push 0
push 0x41f958
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x405f8e
xor eax, eax
jmp 0x406174
test esi, esi
jle 0x405f8e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41f958
call ebx
test eax, eax
jne 0x405f8e
cmp dword [esi*4 + 0x41f918], edi
je 0x40614b
mov eax, dword [0x41f910]
lea esi, [eax - 1]
test esi, esi
jl 0x406139
cmp dword [esi*4 + 0x41f918], edi
je 0x406135
dec esi
jns 0x406129
test esi, esi
jge 0x406149
cmp eax, 0x10
jge 0x406144
inc eax
mov dword [0x41f910], eax
lea esi, [eax - 1]
jmp 0x40614b
je 0x406163
xor ecx, ecx
test esi, esi
jl 0x406163
lea eax, [ecx*4 + 0x41f918]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x406151
push 0
push 0x41f958
call ebx
jmp 0x405f8e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406dac
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41c894]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x41cc80]
je 0x406de1
inc eax
cmp eax, 0x13
jb 0x406dd2
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41cc80]
jne 0x406f07
mov eax, dword [0x41f754]
cmp eax, 1
je 0x406edf
cmp eax, edx
jne 0x406e11
cmp dword [0x41c8b4], 1
je 0x406edf
cmp ecx, 0xfc
je 0x406f07
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x406e47
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00408f60
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403e20
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x406e7b
mov eax, edi
push eax
call fcn.00403e20
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x417a34
push edi
call fcn.0040a120
add esp, 0x10
push edi
call fcn.00403e20
push dword [esi + 0x41cc84]
mov ebx, eax
call fcn.00403e20
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00402ca0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408f60
push edi
push ebx
call fcn.00408f70
push 0x417a30
push ebx
call fcn.00408f70
push dword [esi + 0x41cc84]
push ebx
call fcn.00408f70
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040a020
add esp, 0x2c
jmp 0x406f07
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41cc84]
push dword [esi]
call fcn.00403e20
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 - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00402c85
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40a020
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41fb90], ebx
push esi
push edi
jne 0x40a0a0
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40a0db
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4183cc
push edi
call esi
test eax, eax
mov dword [0x41fb90], eax
je 0x40a0db
push 0x4183bc
push edi
call esi
push 0x4183a8
push edi
mov dword [0x41fb94], eax
call esi
cmp dword [0x41f75c], 2
mov dword [0x41fb98], eax
jne 0x40a0a0
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41fba0], eax
je 0x40a0a0
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41fb9c], eax
mov eax, dword [0x41fb9c]
test eax, eax
je 0x40a0e5
call eax
test eax, eax
je 0x40a0cc
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41fba0]
test eax, eax
je 0x40a0cc
test byte [ebp - 8], 1
jne 0x40a0e5
cmp dword [0x41f768], 4
jb 0x40a0df
or byte [ebp + 0x12], 0x20
jmp 0x40a104
xor eax, eax
jmp 0x40a114
or byte [ebp + 0x12], 4
jmp 0x40a104
mov eax, dword [0x41fb94]
test eax, eax
je 0x40a104
call eax
mov ebx, eax
test ebx, ebx
je 0x40a104
mov eax, dword [0x41fb98]
test eax, eax
je 0x40a104
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41fb90]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a4aa
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x41c894]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40a4db
xor eax, eax
jmp 0x40a664
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x420cc0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40a517
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040bc28
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a5f2
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40a630
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40a57b
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40a56c
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40a54c
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a5bb
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40a5c4
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40a53d
jmp 0x40a5c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40a65f
cmp dword [ebp - 0x6c], edi
je 0x40a630
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40a625
call fcn.00404d75
mov dword [eax], 9
call fcn.00404d7e
mov dword [eax], esi
jmp 0x40a65a
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a61a
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40a5c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40a5c6
push dword [ebp - 0x6c]
call fcn.00404d87
pop ecx
jmp 0x40a65a
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40a648
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40a648
xor eax, eax
jmp 0x40a662
call fcn.00404d75
mov dword [eax], 0x1c
call fcn.00404d7e
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40a662
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00402c85
add ebp, 0x3a0
leave
ret
Function at 0x40beaf
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 0x40c083
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x420cc0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40c083
test cl, 0x48
je 0x40bf1a
cmp byte [eax + 5], 0xa
je 0x40bf1a
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 0x40bf6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40bf54
call fcn.00404d75
mov dword [eax], 9
call fcn.00404d7e
mov dword [eax], esi
jmp 0x40bf64
cmp eax, 0x6d
je 0x40c083
push eax
call fcn.00404d87
pop ecx
or eax, 0xffffffff
jmp 0x40c085
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40c07e
test eax, eax
je 0x40bf93
cmp byte [ebx], 0xa
jne 0x40bf93
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40bf9c
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 0x40c078
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c068
cmp al, 0xd
je 0x40bfce
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40c05a
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40bfe8
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40bfe3
add dword [ebp + 0x10], 2
jmp 0x40c03c
mov dword [ebp + 0x10], eax
jmp 0x40c056
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 0x40c010
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c056
cmp dword [ebp - 0xc], 0
je 0x40c056
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40c031
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c03c
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40c059
cmp ebx, dword [ebp + 0xc]
jne 0x40c041
cmp byte [ebp - 1], 0xa
jne 0x40c041
mov byte [ebx], 0xa
jmp 0x40c059
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040a38b
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40c05a
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40bfb2
jmp 0x40c078
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40c078
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 0x40c085
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x411dad
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x41c894]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, 0x100
cmp esi, eax
ja 0x411dfc
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x411dfc
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x411e08
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [ebp - 4]
pop esi
call fcn.00402c85
leave
ret 8

Function at 0x412eb2
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x41c894]
push esi
mov esi, ecx
cmp dword [esi + 0x50], 0
mov dword [ebp - 4], eax
je 0x412eff
push dword [ebp + 8]
call fcn.00413e15
mov esi, eax
test esi, esi
je 0x412f27
push edi
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
sete al
pop edi
jmp 0x412f27
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push 0x416c04
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [esi + 0x64]
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ecx, dword [ebp - 4]
pop esi
call fcn.00402c85
leave
ret 0xc

Function at 0x4131a4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
cmp dword [ebp + 0xc], 0x800
mov eax, dword [0x41c894]
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
jne 0x413202
push 0x416664
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
mov esi, 0x112
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.004037fe
add esp, 0x10
cmp eax, 0xffffffff
je 0x413216
cmp eax, esi
jae 0x413216
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x413218
push 4
push eax
push 3
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x4131cd
jmp 0x413219
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
call fcn.00402c85
leave
ret
Function at 0x413239
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x41c894]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor ebx, ebx
push str.kernel32.dll
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ebx
xor esi, esi
call edi
push str.GetUserDefaultUILanguage
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4132db
call eax
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ebx, 0x3ff
mov edi, 0xfc00
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ecx, cx
and eax, edi
or eax, ecx
push eax
mov dword [ebp - 0x1c], ecx
call esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
call esi
push str.GetSystemDefaultUILanguage
push dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ebx, cx
and eax, edi
or eax, ebx
push eax
call esi
push ebx
mov dword [ebp - 0x34], eax
call esi
mov dword [ebp - 0x30], eax
push 4
xor ebx, ebx
jmp 0x4133dd
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x41338b
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push ebx
push str.Control_PanelDesktopResourceLocale
push 0x80000001
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4133de
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x413380
cmp dword [ebp - 0x24], 1
jne 0x413380
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push 0x416674
push eax
call fcn.00403855
add esp, 0xc
cmp eax, 1
jne 0x413380
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
push 2
mov dword [ebp - 0x38], eax
pop esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4133de
push str.ntdll.dll
call edi
cmp eax, ebx
je 0x4133de
lea ecx, [ebp - 0x18]
push ecx
push 0x413223
push 1
push 0x10
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceLanguagesA]
cmp word [ebp - 0x18], bx
je 0x4133de
movzx eax, word [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
mov dword [ebp - 0x38], eax
push 2
pop esi
mov dword [ebp + esi*4 - 0x3c], 0x800
inc esi
xor edi, edi
cmp esi, ebx
jle 0x413404
push dword [ebp + edi*4 - 0x3c]
push dword [ebp + 8]
call fcn.004131a4
cmp eax, ebx
pop ecx
pop ecx
jne 0x413406
inc edi
cmp edi, esi
jl 0x4133ed
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.00402c85
leave
ret 4
Function at 0x413415
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, 0x41c110
je 0x4134d1
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4134b9
mov esi, dword [ebx + 4]
jmp 0x4134b3
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 0x4134a3
cmp dword [ebp - 0xc], 4
jne 0x4134a3
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x41349b
or dword [eax + 0x9c], ecx
jmp 0x4134a3
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 0x413467
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x41344a
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x4138be
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x4157f6
call fcn.0040388c
sub esp, 0x11c
mov eax, dword [0x41c894]
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 0x4139b7
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 0x41398b
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.00401ba3
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.004138be
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.004016fa
test bl, bl
jne 0x41398b
or dword [ebp - 4], 0xffffffff
jmp 0x4138fc
cmp esi, 0x103
je 0x41399b
cmp esi, 0x3f2
jne 0x4139ab
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.00402c85
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x41439c
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 0x4143d1
cmp edi, dword [esi + 0xc]
jge 0x4143d1
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4143d1
cmp edi, dword [eax + 8]
jge 0x4143d1
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x4143d3
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 0x4144d7
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 0x41450b
jmp fcn.0040d465
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

Function at 0x41457c
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 0x414675
cmp eax, dword [edi + 0xc]
jge 0x414675
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x4145cd
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x41465e
cmp dword [ebp + 0xc], ebx
je 0x41465e
jmp 0x4145f7
push 0x10
call fcn.00414268
cmp eax, ebx
je 0x4145e3
mov ecx, eax
call fcn.004144ce
mov esi, eax
jmp 0x4145e5
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 0x41460e
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x41461e
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 0x414630
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0040d465
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.00404220
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 0x414670
cmp ecx, dword [esi + 8]
jge 0x414670
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x414676
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8