joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4026f0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419f10
push 0x406018
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x422c68], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x422c64], ecx
shl ecx, 8
add ecx, edx
mov dword [0x422c60], ecx
shr eax, 0x10
mov dword [0x422c5c], eax
call fcn.00403ee0
test eax, eax
jne 0x40275a
push 0x1c
call fcn.004028a0
add esp, 4
call fcn.00405430
test eax, eax
jne 0x40276d
push 0x10
call fcn.004028a0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00405e00
call fcn.00403280
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x424254], eax
call fcn.00405ca0
mov dword [0x422c4c], eax
test eax, eax
je 0x4027a0
mov eax, dword [0x424254]
test eax, eax
jne 0x4027aa
push 0xffffffffffffffff
call fcn.004029c0
add esp, 4
call fcn.004059f0
call fcn.00405900
call fcn.00402990
mov esi, dword [0x424254]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x402889
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4027f1
test al, al
je 0x4027f1
and eax, 0xff
push eax
call fcn.004058a0
add esp, 4
test eax, eax
je 0x4027cb
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4027cb
cmp byte [esi], 0x22
jne 0x4027fa
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40280a
cmp al, 0x20
ja 0x40280a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4027fa
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40282b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x402830
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.004029c0
jmp 0x40286e
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x4027fa
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402889

Function at 0x402a00
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00402ac0
mov eax, dword [0x422c98]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x402a24
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x422c94], 1
mov byte [0x422c90], bl
jne 0x402a7e
mov ecx, dword [0x42424c]
test ecx, ecx
je 0x402a6c
mov esi, dword [0x424248]
sub esi, 4
cmp esi, ecx
jb 0x402a6c
mov eax, dword [esi]
test eax, eax
je 0x402a65
call eax
mov ecx, dword [0x42424c]
sub esi, 4
cmp esi, ecx
jae 0x402a57
push 0x41d074
push 0x41d06c
call fcn.00402ae0
add esp, 8
push 0x41d080
push 0x41d078
call fcn.00402ae0
add esp, 8
test ebx, ebx
je 0x402a9d
call fcn.00402ad0
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x422c98], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x405430
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.00403f20
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x41fbb0], eax
je 0x405488
push 0x74
push 1
call fcn.00406310
mov esi, eax
add esp, 8
test esi, esi
je 0x405488
mov eax, dword [0x41fbb0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x405488
push esi
call fcn.00405490
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 0x4054b0
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 [0x41fbb0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40551e
push 0x74
push 1
call fcn.00406310
mov esi, eax
add esp, 8
test esi, esi
je 0x405514
mov ecx, dword [0x41fbb0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x405514
push esi
call fcn.00405490
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.004028a0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x405ca0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x422f80]
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 0x405ce2
call edi
mov esi, eax
test esi, esi
je 0x405ccc
mov eax, 1
jmp 0x405cdd
call ebp
mov ebx, eax
test ebx, ebx
je 0x405def
mov eax, 2
mov dword [0x422f80], eax
cmp eax, 1
jne 0x405d82
test esi, esi
jne 0x405cfb
call edi
mov esi, eax
test esi, esi
je 0x405def
cmp word [esi], 0
mov eax, esi
je 0x405d15
add eax, 2
cmp word [eax], 0
jne 0x405d03
add eax, 2
cmp word [eax], 0
jne 0x405d03
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 0x405d74
push edi
call fcn.00402150
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405d74
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 0x405d66
push ebx
call fcn.004020e0
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 0x405def
test ebx, ebx
jne 0x405d93
call ebp
mov ebx, eax
test ebx, ebx
je 0x405def
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x405dab
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405d9b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405d9b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00402150
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x405dcd
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 0x406130
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x41fc68
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x406154
add eax, 8
inc ebp
cmp eax, 0x41fcf8
jb 0x406145
cmp ecx, dword [ebp*8 + 0x41fc68]
jne 0x4062fb
mov eax, dword [0x422c54]
cmp eax, 1
je 0x4062bd
test eax, eax
jne 0x406180
cmp dword [0x41d764], 1
je 0x4062bd
cmp ecx, 0xfc
je 0x4062fb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4061bb
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 0x406204
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 0x41a3bc
add ebx, ecx
push ebx
call fcn.00406c80
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, 0x41a39c
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 + 0x41fc6c]
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.00406bf0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x424140]
test eax, eax
je 0x4062ce
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x4062d8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x41fc6c]
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 0x408830
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x423100]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x408878
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x408858
mov eax, 2
jmp 0x408873
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x408958
mov eax, 1
mov dword [0x423100], eax
cmp eax, 2
jne 0x408898
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 0x40896a
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4088b3
mov ecx, dword [0x422fa8]
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 0x4088d2
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.00402150
mov esi, eax
add esp, 4
test esi, esi
jne 0x4088e9
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 0x40894f
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x408930
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 0x40894f
push esi
call fcn.004020e0
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 0x40895f
push esi
call fcn.004020e0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.004020e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40c2c0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.00402f50
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x40c38b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x40c38b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x40c33e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x40c349
or bh, 8
and edi, 0x8000000
je 0x40c364
mov eax, dword [0x4242bc]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x40c38b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c760
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40c78b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x40c7af
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x40c7ca
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x40e3ae
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x4178c8
call fcn.00402920
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.00416908
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x40e3fc
call fcn.00416908
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 0x40e40a
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40e418
or eax, 0xffffffff
jmp 0x40e504
mov ecx, esi
call fcn.0040e339
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.0040f157
push edi
call fcn.0040ebfa
and dword [ebp - 0x1c], 0
test edi, edi
je 0x40e452
push edi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x40e452
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.0040f10b
push edi
call fcn.0040ebfa
push ebx
push eax
push dword [ebp - 0x14]
mov ecx, esi
call fcn.0040e0d0
xor ebx, ebx
cmp eax, ebx
je 0x40e4cb
test byte [esi + 0x24], 0x10
je 0x40e496
push 4
mov ecx, esi
pop ebx
call fcn.00411527
test ah, 1
je 0x40e48c
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00411188
xor ebx, ebx
cmp dword [esi + 0x1c], ebx
je 0x40e4cb
push 0x97
push ebx
push ebx
push ebx
push ebx
push ebx
mov ecx, esi
call fcn.004115b6
jmp 0x40e4cb
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], ebx
je 0x40e4dd
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp edi, ebx
je 0x40e4f3
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x40e4f3
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.0040e370
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 0x41107e
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 0x4110c0
call fcn.00416908
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4110c0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4110b7
xor eax, eax
jmp 0x4110c8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004110ce
pop edi
pop esi
pop ebx
ret 4

Function at 0x412efd
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 0x412f1a
cmp dword [0x422c1c], edi
jne 0x41306c
cmp word [0x422c28], di
mov dword [0x422c1c], 1
jne 0x412f4c
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 [0x422c24], eax
mov word [0x422c28], cx
cmp word [0x422c28], 2
jne 0x412f88
push str.Magellan_MSWHEEL
push str.MouseZ
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, edi
je 0x412f88
mov ecx, dword [0x422c24]
cmp ecx, edi
je 0x412f88
push edi
push edi
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x422c20], eax
jmp 0x413071
push 0x94
lea eax, [ebp - 0x9c]
push edi
push eax
call fcn.00402b00
add esp, 0xc
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x94
mov dword [0x422c20], 3
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x41306c
cmp dword [ebp - 0x8c], 1
je 0x412fdc
cmp dword [ebp - 0x8c], 2
jne 0x41306c
cmp dword [ebp - 0x98], 4
jae 0x41304b
lea eax, [ebp + 8]
push eax
push 1
push edi
push str.Control_PanelDesktop
push 0x80000001
call dword [0x425540]
test eax, eax
jne 0x41306c
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 [0x425544]
test eax, eax
jne 0x413040
push 0xa
lea eax, [ebp - 0x11c]
push edi
push eax
call fcn.00403be0
add esp, 0xc
mov dword [0x422c20], eax
push dword [ebp + 8]
call dword [0x42554c]
jmp 0x41306c
cmp dword [ebp - 0x8c], 2
jne 0x41306c
cmp dword [ebp - 0x98], 4
jb 0x41306c
push edi
push 0x422c20
push edi
push 0x68
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [0x422c20]
pop edi
leave
ret
Function at 0x413d59
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 0x413d9d
push dword [ebp + 8]
call fcn.0041702d
mov esi, eax
test esi, esi
je 0x413dc8
lea eax, [ebp + 0x10]
push 4
push eax
push 4
push 0
push dword [ebp + 0xc]
push esi
call dword [0x425534]
push esi
mov edi, eax
call dword [0x42554c]
xor eax, eax
test edi, edi
sete al
jmp 0x413dc8
push dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push 0x418f9c
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 0x41671d
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x4179f2
call fcn.00402920
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.0040cc96
push 0xa
lea ecx, [esi + 0x4c]
mov byte [ebp - 4], 1
call fcn.0040cc96
push 0xa
lea ecx, [esi + 0x68]
mov byte [ebp - 4], 2
call fcn.0040cb13
mov ecx, dword [ebp - 0xc]
mov dword [esi], vtable.AFX_MODULE_THREAD_STATE.0
mov dword [esi + 0xc], 0x54
mov dword [esi + 0x28], 0x40deb5
mov eax, esi
mov dword fs:[0], ecx
pop esi
leave
ret

Function at 0x416c89
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 0x416cb9
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 8]
jl 0x416d43
cmp dword [esp + 0x14], ebx
je 0x416d43
cmp esi, ebx
jne 0x416cdf
push 0x10
call fcn.00416aa6
cmp eax, ebx
je 0x416cce
mov dword [eax], vtable.CThreadData.0
mov esi, eax
jmp 0x416cd0
xor esi, esi
push esi
lea ecx, [edi + 0x14]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
call fcn.00416a48
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x416cf6
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x416d06
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 0x416d12
call fcn.0040caf8
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.00402b00
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 0x416d79
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 0x416dcc
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x416daf
mov ecx, dword [ebx + 0x10]
cmp dword [ecx + edi*8 + 4], eax
je 0x416daf
mov eax, dword [esi + 0xc]
cmp dword [eax + edi*4], 0
je 0x416dc6
and dword [ebp - 4], 0
jmp 0x416dc6
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x416dbf
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 0x416d90
cmp dword [ebp - 4], 0
je 0x416dfa
push esi
lea ecx, [ebx + 0x14]
call fcn.00416a5b
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x416df0
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