joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44f710
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.00442a50
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x44f7db
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 0x44f7db
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x44f78e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x44f799
or bh, 8
and edi, 0x8000000
je 0x44f7b4
mov eax, dword [0x4876dc]
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 0x44f7db
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 0x44fbb0
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 0x44fbdb
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 0x44fbff
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 0x44fc1a
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 0x451b87
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x45ebb4
call fcn.004426f0
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.0045cfe0
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x451bd5
call fcn.0045cfe0
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 0x451be3
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x451bf1
or eax, 0xffffffff
jmp 0x451cdd
mov ecx, esi
call fcn.00451b12
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.00452e71
push edi
call fcn.004528bf
and dword [ebp - 0x1c], 0
test edi, edi
je 0x451c2b
push edi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x451c2b
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.00452e25
push edi
call fcn.004528bf
push ebx
push eax
push dword [ebp - 0x14]
mov ecx, esi
call fcn.004518a9
xor ebx, ebx
cmp eax, ebx
je 0x451ca4
test byte [esi + 0x24], 0x10
je 0x451c6f
push 4
mov ecx, esi
pop ebx
call fcn.004552d0
test ah, 1
je 0x451c65
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00454e98
xor ebx, ebx
cmp dword [esi + 0x1c], ebx
je 0x451ca4
push 0x97
push ebx
push ebx
push ebx
push ebx
push ebx
mov ecx, esi
call fcn.004553bb
jmp 0x451ca4
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], ebx
je 0x451cb6
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp edi, ebx
je 0x451ccc
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x451ccc
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.00451b49
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 0x45333e
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x453376
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0045238e
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00452366
jmp 0x453382
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x90]
pop esi
ret 4
Function at 0x454d8e
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 0x454dd0
call fcn.0045cfe0
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x454dd0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x454dc7
xor eax, eax
jmp 0x454dd8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00454dde
pop edi
pop esi
pop ebx
ret 4

Function at 0x456c1b
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 0x456c38
cmp dword [0x485f04], edi
jne 0x456d8a
cmp word [0x485f10], di
mov dword [0x485f04], 1
jne 0x456c6a
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 [0x485f0c], eax
mov word [0x485f10], cx
cmp word [0x485f10], 2
jne 0x456ca6
push str.Magellan_MSWHEEL
push str.MouseZ
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, edi
je 0x456ca6
mov ecx, dword [0x485f0c]
cmp ecx, edi
je 0x456ca6
push edi
push edi
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x485f08], eax
jmp 0x456d8f
push 0x94
lea eax, [ebp - 0x9c]
push edi
push eax
call fcn.00442940
add esp, 0xc
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x94
mov dword [0x485f08], 3
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x456d8a
cmp dword [ebp - 0x8c], 1
je 0x456cfa
cmp dword [ebp - 0x8c], 2
jne 0x456d8a
cmp dword [ebp - 0x98], 4
jae 0x456d69
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 0x456d8a
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x80
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 0x456d5e
push 0xa
lea eax, [ebp - 0x11c]
push edi
push eax
call fcn.00443950
add esp, 0xc
mov dword [0x485f08], eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x456d8a
cmp dword [ebp - 0x8c], 2
jne 0x456d8a
cmp dword [ebp - 0x98], 4
jb 0x456d8a
push edi
push 0x485f08
push edi
push 0x68
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [0x485f08]
pop edi
leave
ret
Function at 0x4579dc
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 0x457a20
push dword [ebp + 8]
call fcn.0045c820
mov esi, eax
test esi, esi
je 0x457a4b
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 0x457a4b
push dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push 0x4662cc
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 0x45ce67
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x45ef6a
call fcn.004426f0
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.00450456
push 0xa
lea ecx, [esi + 0x4c]
mov byte [ebp - 4], 1
call fcn.00450456
push 0xa
lea ecx, [esi + 0x68]
mov byte [ebp - 4], 2
call fcn.004502d3
mov ecx, dword [ebp - 0xc]
mov dword [esi], vtable.AFX_MODULE_THREAD_STATE.0
mov dword [esi + 0xc], 0x54
mov dword [esi + 0x28], 0x4523e3
mov eax, esi
mov dword fs:[0], ecx
pop esi
leave
ret

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

Disassembly:
push esi
push edi
mov edi, ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x45d3a1
mov eax, dword [esp + 0xc]
cmp eax, dword [esi + 8]
jl 0x45d443
cmp dword [esp + 0x10], 0
je 0x45d443
test esi, esi
jne 0x45d3dd
push 0x10
call fcn.0045d190
test eax, eax
je 0x45d3b6
mov dword [eax], vtable.CThreadData.0
mov esi, eax
jmp 0x45d3b8
xor esi, esi
and dword [esi + 8], 0
and dword [esi + 0xc], 0
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
lea ecx, [edi + 0x14]
call fcn.0045d132
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x45d3f5
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x45d405
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
test eax, eax
mov dword [esi + 0xc], eax
jne 0x45d411
call fcn.004500e9
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 0
lea eax, [ecx + eax*4]
push eax
call fcn.00442940
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 + 0xc]
mov ecx, dword [esp + 0x10]
pop edi
mov dword [eax + edx*4], ecx
pop esi
ret 8
Function at 0x45d478
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 0x45d4cb
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x45d4ae
mov ecx, dword [ebx + 0x10]
cmp dword [ecx + edi*8 + 4], eax
je 0x45d4ae
mov eax, dword [esi + 0xc]
cmp dword [eax + edi*4], 0
je 0x45d4c5
and dword [ebp - 4], 0
jmp 0x45d4c5
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x45d4be
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 0x45d48f
cmp dword [ebp - 4], 0
je 0x45d50a
lea edi, [ebx + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
lea ecx, [ebx + 0x14]
call fcn.0045d145
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x45d500
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

Function at 0x45da1f
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x45dacf
mov ecx, 0x485f14
call fcn.0045d5ff
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov esi, eax
cmp word [esi + 8], 0
jne 0x45daad
push str.COMCTL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp + 0xc], eax
je 0x45da8b
mov ecx, dword [ebp + 0x10]
push 5
neg ecx
sbb ecx, ecx
and ecx, 0xe
add ecx, 0x3ee
movzx ecx, cx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x45da8b
push ebx
push edi
push eax
call fcn.00455ecd
add esp, 0xc
mov eax, dword [edi]
mov eax, dword [eax - 8]
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 4], eax
push dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ax, word [ebx]
mov word [esi + 8], ax
push dword [esi + 4]
mov ecx, edi
call fcn.004521c6
mov si, word [esi + 8]
xor eax, eax
mov word [ebx], si
cmp si, 0xffff
pop edi
pop esi
setne al
pop ebx
pop ebp
ret 0xc
Function at 0x4010c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4010db
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401112
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40110e
jmp 0x401100
cmp esi, eax
jae 0x401112
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401100
cmp esi, eax
jb 0x401119
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x406f50
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x5b4450]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x104
lea eax, [ebp - 0x20c]
push eax
mov ebx, ecx
push 0
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x41c], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x406ff3
lea ecx, [ebp - 0x20c]
push 0x5c
push ecx
call fcn.00534819
add esp, 8
push 0x58ace4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x58abe4
lea edx, [ebp - 0x20c]
push edx
call ebx
push str.DebugSettings.ini
lea eax, [ebp - 0x20c]
push eax
call ebx
lea ecx, [ebp - 0x20c]
push ecx
push 0x104
lea edx, [ebp - 0x414]
push edx
push 0x58a8c8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebx, dword [ebp - 0x418]
lea eax, [ebp - 0x414]
push eax
mov ecx, ebx
call fcn.00401210
mov ecx, dword [ebp - 4]
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.005337cb
mov esp, ebp
pop ebp
ret
Function at 0x409ac0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x5b4450]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.PrinterDriverData
xor eax, eax
push edi
push str.SystemCurrentControlSetControlPrintPrinters
mov dword [ebp - 0xc], eax
mov byte [ebp - 8], al
lea eax, [ebp - 0x624]
xor esi, esi
push 0x58b240
push eax
mov dword [ebp - 0x628], esi
mov dword [ebp - 0x62c], esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea ecx, [ebp - 0x630]
push ecx
push 0x20019
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea edx, [ebp - 0x624]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
je 0x409bd7
lea eax, [ebp - 0x628]
push eax
push 0x20019
push 0
push str.SystemCurrentControlSetControlPrintPrinters
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x409c80
mov edx, dword [ebp - 0x628]
lea ecx, [ebp - 0x62c]
push ecx
push 0x20019
push eax
push edi
push edx
call esi
test eax, eax
je 0x409b8e
mov eax, dword [ebp - 0x628]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005337cb
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x62c]
lea ecx, [ebp - 0x630]
push ecx
push 0x20019
push 0
push str.PrinterDriverData
push edx
call esi
test eax, eax
je 0x409bd7
mov eax, dword [ebp - 0x62c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov ecx, dword [ebp - 0x628]
push ecx
call esi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005337cb
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x634]
push edx
mov edx, dword [ebp - 0x630]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x638]
push ecx
push 0
push str.PrinterID
push edx
mov dword [ebp - 0x634], 4
mov dword [ebp - 0x638], 3
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x409c5d
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x630]
mov cl, byte [ebp - 8]
mov dword [ebx], eax
push edx
mov byte [ebx + 4], cl
call esi
mov eax, dword [ebp - 0x62c]
test eax, eax
je 0x409c3c
push eax
call esi
mov eax, dword [ebp - 0x628]
test eax, eax
je 0x409c49
push eax
call esi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005337cb
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x630]
push eax
call esi
mov eax, dword [ebp - 0x62c]
test eax, eax
je 0x409c73
push eax
call esi
mov eax, dword [ebp - 0x628]
test eax, eax
je 0x409c80
push eax
call esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.005337cb
mov esp, ebp
pop ebp
ret
Function at 0x40ac70
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5597f0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5b4450]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [esi + 4], 1
mov dword [esi], ebx
cmp dword [0x5ceb28], ebx
jne 0x40acb9
call fcn.0040b0b0
cmp dword [0x5ceb24], ebx
jne 0x40acc9
cmp dword [0x5b72b4], ebx
je 0x40ad33
push 0x800
call fcn.004401c2
add esp, 4
mov dword [esi], eax
cmp eax, ebx
je 0x40ad29
push 0x800
push ebx
push eax
call fcn.005373f0
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
add esp, 0xc
mov edi, SysReAllocString
mov esi, 0x400
lea ebx, [ebx]
test esi, esi
je 0x40ad1e
test edi, edi
je 0x40ad21
movzx edx, word [ecx]
test dx, dx
je 0x40ad21
mov word [eax], dx
add eax, 2
add ecx, 2
dec esi
dec edi
inc ebx
jmp 0x40ad00
sub eax, 2
mov esi, dword [ebp + 8]
xor ecx, ecx
mov word [eax], cx
xor ebx, ebx
cmp dword [0x5ceb24], ebx
jne 0x40ad44
push 0x5a7878
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x14], ebx
call fcn.005372e6
cmp dword [ebp + 0x10], ebx
jne 0x40ad6d
push 0x58a8c8
push 1
push esi
call fcn.0040aed0
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x800
call fcn.004401c2
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x40ade0
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
push ecx
push 0x3ff
push edi
call fcn.0053635e
add esp, 0x10
cmp eax, ebx
jl 0x40add5
cmp eax, 0x3ff
ja 0x40add5
jne 0x40adac
xor edx, edx
mov word [edi + 0x7fe], dx
push edi
push 1
push esi
call fcn.0040aed0
add esp, 0xc
push edi
call fcn.004401b7
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov word [edi + 0x7fe], ax
jmp 0x40adb8
push str.____logging_Error__
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40aed0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5597b0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5b4450]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
xor esi, esi
lea eax, [edx - 1]
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
cmp eax, 6
ja case.default.0x40af1c
movzx eax, byte [eax + 0x40b024]
jmp dword [eax*4 + 0x40b01c]
cmp dword [0x5ceb24], esi
je case.default.0x40af1c
jmp 0x40af36
cmp dword [0x5ceb24], 2
jne case.default.0x40af1c
mov edi, 1
lea eax, [edx - 3]
cmp eax, 3
ja case.default.0x40af43
jmp dword [eax*4 + 0x40b02c]
mov eax, dword [0x5b72b4]
and eax, 4
cmp al, 4
jmp 0x40af6c
mov eax, dword [0x5b72b4]
and eax, 2
cmp al, 2
jmp 0x40af6c
mov eax, dword [0x5b72b4]
and eax, 1
cmp al, 1
jne case.default.0x40af43
mov ebx, 1
cmp edi, esi
jne 0x40af8c
cmp ebx, esi
jne 0x40af8c
push 0x5a78ac
lea ecx, [ebp - 0x18]
push ecx
mov dword [ebp - 0x18], esi
call fcn.005372e6
cmp ecx, esi
je 0x40afe5
lea eax, [ebp + 0x14]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
push edx
lea edx, [ebp - 0x14]
call fcn.0040b2a0
mov esi, eax
test esi, esi
je 0x40afe0
test edi, edi
je 0x40afc9
cmp dword [0x5ceb2c], 0
je 0x40afc2
mov ecx, dword [ebp - 0x14]
push ecx
push esi
call fcn.0040b8f0
jmp 0x40afc9
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test ebx, ebx
je 0x40afd7
mov edx, dword [ebp + 0xc]
push esi
push edx
call fcn.0040b740
push esi
call fcn.004401b7
add esp, 4
mov edx, dword [ebp + 0xc]
xor esi, esi
cmp edx, 2
jne 0x40aff0
mov eax, dword [ebp + 8]
mov dword [eax + 4], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret