joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407f70
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00408190
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x423bb0], eax
je 0x407fc8
push 0x74
push 1
call fcn.0040b0f0
mov esi, eax
add esp, 8
test esi, esi
je 0x407fc8
mov eax, dword [0x423bb0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x407fc8
push esi
call fcn.00407fd0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x423bb0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40805e
push 0x74
push 1
call fcn.0040b0f0
mov esi, eax
add esp, 8
test esi, esi
je 0x408054
mov ecx, dword [0x423bb0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x408054
push esi
call fcn.00407fd0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.00405a80
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x409e10
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4292e0]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x409e52
call edi
mov esi, eax
test esi, esi
je 0x409e3c
mov eax, 1
jmp 0x409e4d
call ebp
mov ebx, eax
test ebx, ebx
je 0x409f5f
mov eax, 2
mov dword [0x4292e0], eax
cmp eax, 1
jne 0x409ef2
test esi, esi
jne 0x409e6b
call edi
mov esi, eax
test esi, esi
je 0x409f5f
cmp word [esi], 0
mov eax, esi
je 0x409e85
add eax, 2
cmp word [eax], 0
jne 0x409e73
add eax, 2
cmp word [eax], 0
jne 0x409e73
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x409ee4
push edi
call fcn.00405ad0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x409ee4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x409ed6
push ebx
call fcn.00405ba0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x409f5f
test ebx, ebx
jne 0x409f03
call ebp
mov ebx, eax
test ebx, ebx
je 0x409f5f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x409f1b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409f0b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409f0b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00405ad0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x409f3d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40a2e0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x423f68
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40a304
add eax, 8
inc ebp
cmp eax, 0x423ff8
jb 0x40a2f5
cmp ecx, dword [ebp*8 + 0x423f68]
jne 0x40a4ab
mov eax, dword [0x429008]
cmp eax, 1
je 0x40a46d
test eax, eax
jne 0x40a330
cmp dword [0x423880], 1
je 0x40a46d
cmp ecx, 0xfc
je 0x40a4ab
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40a36b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40a3b4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x420a14
add ebx, ecx
push ebx
call fcn.0040d150
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4209f4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x423f6c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040d0c0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x42a4a0]
test eax, eax
je 0x40a47e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x40a488
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x423f6c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x40c200
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40c22c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x42a4a0]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x40c267
push 2
push ebp
push ecx
call fcn.0040c100
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40c3c9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40c311
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40c2c2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40c2af
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40c292
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c3ba
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40c30d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40c28e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40c3a9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40c365
cmp eax, 5
jne 0x40c34e
call fcn.00406c10
mov dword [eax], 9
call fcn.00406c20
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00406b90
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40c385
cmp byte [ebp], 0x1a
jne 0x40c385
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.00406c10
mov dword [eax], 0x1c
call fcn.00406c20
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40c30d
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c3fa
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40c311
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40c311
Function at 0x40fbc0
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x429468]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x40fc08
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x40fbe8
mov eax, 2
jmp 0x40fc03
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40fce8
mov eax, 1
mov dword [0x429468], eax
cmp eax, 2
jne 0x40fc28
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x40fcfa
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40fc43
mov ecx, dword [0x429320]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x40fc62
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.00405ad0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40fc79
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40fcdf
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x40fcc0
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x40fcdf
push esi
call fcn.00405ba0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x40fcef
push esi
call fcn.00405ba0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.00405ba0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4104a0
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x41065e
push 0x3d
push edi
call fcn.00406560
mov esi, eax
add esp, 8
test esi, esi
je 0x41065e
cmp edi, esi
je 0x41065e
mov dl, byte [esi + 1]
mov ecx, dword [0x428fd8]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x428fd4]
cmp eax, ecx
jne 0x4104f7
push eax
call fcn.00410730
add esp, 4
mov dword [0x428fd4], eax
test eax, eax
jne 0x410572
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41051e
mov eax, dword [0x428fdc]
test eax, eax
je 0x41051e
call fcn.0040f860
test eax, eax
je 0x41056d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x41052a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00405ad0
add esp, 4
mov dword [0x428fd4], eax
test eax, eax
je 0x41065e
mov dword [eax], 0
mov eax, dword [0x428fdc]
test eax, eax
jne 0x41056d
push 4
call fcn.00405ad0
add esp, 4
mov dword [0x428fdc], eax
test eax, eax
je 0x41065e
mov dword [eax], 0
mov eax, dword [0x428fd4]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.004106b0
mov esi, eax
add esp, 8
test esi, esi
jl 0x41066f
cmp dword [ebx], 0
je 0x41066f
test ebp, ebp
je 0x410667
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00405ba0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x4105c9
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x4105b8
lea eax, [esi*4]
push eax
push ebx
call fcn.00409610
add esp, 8
test eax, eax
je 0x4105e3
mov dword [0x428fd4], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x410656
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00405ad0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x410656
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.00405ba0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x4105e7
test ebp, ebp
jne 0x410656
test esi, esi
jge 0x410679
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.00409610
add esp, 8
test eax, eax
je 0x41065e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x428fd4], eax
jmp 0x4105e7
Function at 0x412033
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x41d168
call fcn.00405ab0
push ecx
sub esp, 0x14
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x14], eax
call fcn.0041bc7a
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x412072
call fcn.0041bc7a
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x412080
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x41208e
or eax, 0xffffffff
jmp 0x41217a
mov ecx, esi
call fcn.00411faf
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.00412dcd
push edi
call fcn.00412870
and dword [ebp - 0x1c], 0
test edi, edi
je 0x4120c8
push edi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x4120c8
push 0
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x1c], 1
and dword [ebp - 4], 0
push esi
call fcn.00412d81
push edi
call fcn.00412870
push ebx
push eax
push dword [ebp - 0x14]
mov ecx, esi
call fcn.00411d46
xor ebx, ebx
cmp eax, ebx
je 0x412141
test byte [esi + 0x24], 0x10
je 0x41210c
push 4
mov ecx, esi
pop ebx
call fcn.00415256
test ah, 1
je 0x412102
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00414e45
xor ebx, ebx
cmp dword [esi + 0x1c], ebx
je 0x412141
push 0x97
push ebx
push ebx
push ebx
push ebx
push ebx
mov ecx, esi
call fcn.004152e5
jmp 0x412141
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], ebx
je 0x412153
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp edi, ebx
je 0x412169
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x412169
push edi
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov ecx, esi
call fcn.00411fe6
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x414d3b
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x414d7d
call fcn.0041bc7a
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x414d7d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x414d74
xor eax, eax
jmp 0x414d85
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00414d8b
pop edi
pop esi
pop ebx
ret 4

Function at 0x415e29
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, ecx
push 0
mov eax, dword [esi]
push dword [esp + 0xc]
call dword [eax + 0x30]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x415e51
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041789f
pop esi
ret 4

Function at 0x418645
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push edi
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x418662
cmp dword [0x428f6c], edi
jne 0x4187b4
cmp word [0x428f78], di
mov dword [0x428f6c], 1
jne 0x418694
push str.MSH_SCROLL_LINES_MSG
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
xor ecx, ecx
cmp eax, edi
setne cl
inc ecx
mov dword [0x428f74], eax
mov word [0x428f78], cx
cmp word [0x428f78], 2
jne 0x4186d0
push str.Magellan_MSWHEEL
push str.MouseZ
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, edi
je 0x4186d0
mov ecx, dword [0x428f74]
cmp ecx, edi
je 0x4186d0
push edi
push edi
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x428f70], eax
jmp 0x4187b9
push 0x94
lea eax, [ebp - 0x9c]
push edi
push eax
call fcn.004062e0
add esp, 0xc
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x94
mov dword [0x428f70], 3
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4187b4
cmp dword [ebp - 0x8c], 1
je 0x418724
cmp dword [ebp - 0x8c], 2
jne 0x4187b4
cmp dword [ebp - 0x98], 4
jae 0x418793
lea eax, [ebp + 8]
push eax
push 1
push edi
push str.Control_PanelDesktop
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4187b4
lea eax, [ebp - 4]
mov dword [ebp - 4], pe_nt_image_headers32
push eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 8]
push eax
push edi
push str.WheelScrollLines
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x418788
push 0xa
lea eax, [ebp - 0x11c]
push edi
push eax
call fcn.00406b70
add esp, 0xc
mov dword [0x428f70], eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4187b4
cmp dword [ebp - 0x8c], 2
jne 0x4187b4
cmp dword [ebp - 0x98], 4
jb 0x4187b4
push edi
push 0x428f70
push edi
push 0x68
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [0x428f70]
pop edi
leave
ret
Function at 0x419388
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x7c], 0
je 0x4193cc
push dword [ebp + 8]
call fcn.0041cc86
mov esi, eax
test esi, esi
je 0x4193f7
lea eax, [ebp + 0x10]
push 4
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
jmp 0x4193f7
push dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push 0x423120
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10]
push dword [esi + 0x90]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
pop edi
pop esi
leave
ret 0xc

Function at 0x41ba8f
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x41d2a6
call fcn.00405ab0
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi], vtable.CNoTrackObject.0
xor eax, eax
push 0xa
lea ecx, [esi + 0x30]
mov dword [ebp - 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
call fcn.0041146b
push 0xa
lea ecx, [esi + 0x4c]
mov byte [ebp - 4], 1
call fcn.0041146b
push 0xa
lea ecx, [esi + 0x68]
mov byte [ebp - 4], 2
call fcn.004112e8
mov ecx, dword [ebp - 0xc]
mov dword [esi], vtable.AFX_MODULE_THREAD_STATE.0
mov dword [esi + 0xc], 0x54
mov dword [esi + 0x28], 0x411987
mov eax, esi
mov dword fs:[0], ecx
pop esi
leave
ret

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

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x41c520
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 8]
jl 0x41c5aa
cmp dword [esp + 0x14], ebx
je 0x41c5aa
cmp esi, ebx
jne 0x41c546
push 0x10
call fcn.0041c30d
cmp eax, ebx
je 0x41c535
mov dword [eax], vtable.CThreadData.0
mov esi, eax
jmp 0x41c537
xor esi, esi
push esi
lea ecx, [edi + 0x14]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
call fcn.0041c2af
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x41c55d
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x41c56d
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
mov dword [esi + 0xc], eax
jne 0x41c579
call fcn.00410b17
mov eax, dword [esi + 8]
mov ecx, eax
imul ecx, ecx, 0x3fffffff
add ecx, dword [edi + 0xc]
shl ecx, 2
push ecx
mov ecx, dword [esi + 0xc]
push ebx
lea eax, [ecx + eax*4]
push eax
call fcn.004062e0
mov eax, dword [edi + 0xc]
add esp, 0xc
mov dword [esi + 8], eax
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
pop edi
pop esi
mov dword [eax + edx*4], ecx
pop ebx
ret 8
Function at 0x41c5e0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 1
mov ebx, ecx
pop edi
cmp dword [esi + 8], edi
mov dword [ebp - 4], edi
jle 0x41c633
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41c616
mov ecx, dword [ebx + 0x10]
cmp dword [ecx + edi*8 + 4], eax
je 0x41c616
mov eax, dword [esi + 0xc]
cmp dword [eax + edi*4], 0
je 0x41c62d
and dword [ebp - 4], 0
jmp 0x41c62d
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x41c626
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [esi + 0xc]
and dword [eax + edi*4], 0
inc edi
cmp edi, dword [esi + 8]
jl 0x41c5f7
cmp dword [ebp - 4], 0
je 0x41c661
push esi
lea ecx, [ebx + 0x14]
call fcn.0041c2c2
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x41c657
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop esi
pop ebx
leave
ret 8