joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406c4f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x5f5a64]
mov eax, dword [0x40f174]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x406e15
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x5f5a80]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x406e15
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x406cb9
xor eax, eax
jmp 0x406e29
test al, 0x20
je 0x406cca
push 2
push edi
push edi
push ecx
call fcn.0040a294
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x406d9f
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x406de6
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x406d2c
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x406d1d
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x406cff
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406d6c
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x406d78
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x406cf3
jmp 0x406d7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x406e10
cmp dword [ebp + 0x3a4], edi
je 0x406de6
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x406dd8
mov dword [0x5f45f0], eax
jmp 0x406e1c
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406dca
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x406d7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x406d7a
push dword [ebp + 0x3a4]
call fcn.0040a235
pop ecx
jmp 0x406e26
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x406dfe
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x406cb2
mov dword [0x5f45ec], 0x1c
mov dword [0x5f45f0], edi
jmp 0x406e26
sub eax, dword [ebp - 0x7c]
jmp 0x406e29
and dword [0x5f45f0], 0
mov dword [0x5f45ec], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040a192
add ebp, 0x39c
leave
ret
Function at 0x408d2b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x5f4638], esi
push edi
jne 0x408d4b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x5f4634], esi
mov byte [0x5f4630], al
jne 0x408db1
mov ecx, dword [0x5f5b88]
test ecx, ecx
je 0x408d92
mov eax, dword [0x5f5b84]
sub eax, 4
cmp eax, ecx
jmp 0x408d8b
mov eax, dword [eax]
test eax, eax
je 0x408d7d
call eax
mov eax, dword [0x5f5b84]
sub eax, 4
cmp eax, dword [0x5f5b88]
mov dword [0x5f5b84], eax
jae 0x408d75
mov eax, 0x40f028
mov esi, 0x40f030
cmp eax, esi
mov edi, eax
jae 0x408db1
mov eax, dword [edi]
test eax, eax
je 0x408daa
call eax
add edi, 4
cmp edi, esi
jb 0x408da2
mov eax, 0x40f034
mov esi, 0x40f03c
cmp eax, esi
mov edi, eax
jae 0x408dd0
mov eax, dword [edi]
test eax, eax
je 0x408dc9
call eax
add edi, 4
cmp edi, esi
jb 0x408dc1
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x408dea
push dword [ebp + 8]
mov dword [0x5f4638], 1
call fcn.00408c91
pop ebp
ret

Function at 0x409038
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40f174]
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 + 0x40f180]
je 0x40906d
inc eax
cmp eax, 0x13
jb 0x40905e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40f180]
jne 0x409193
mov eax, dword [0x5f45cc]
cmp eax, 1
je 0x40916b
cmp eax, edx
jne 0x40909d
cmp dword [0x40f158], 1
je 0x40916b
cmp ecx, 0xfc
je 0x409193
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 0x4090d3
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040aed0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040a070
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x409107
mov eax, edi
push eax
call fcn.0040a070
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40dbf8
push edi
call fcn.0040afd0
add esp, 0x10
push edi
call fcn.0040a070
push dword [esi + 0x40f184]
mov ebx, eax
call fcn.0040a070
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00409b40
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040aed0
push edi
push ebx
call fcn.0040aee0
push 0x40dbd8
push ebx
call fcn.0040aee0
push dword [esi + 0x40f184]
push ebx
call fcn.0040aee0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040add4
add esp, 0x2c
jmp 0x409193
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40f184]
push dword [esi]
call fcn.0040a070
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.0040a192
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40a9e0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00409b40
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40aa7b
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x5f45f8]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40aa7b
cmp eax, 1
je 0x40aa9c
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40aa7b
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40aa48
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40aa77
xor eax, eax
inc eax
jmp 0x40aabb
cmp edi, eax
jae 0x40aa7f
xor eax, eax
jmp 0x40aabb
cmp eax, esi
jae 0x40aa86
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x5f45f8]
jmp 0x40aa9f
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40add4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x5f4760], ebx
push esi
push edi
jne 0x40ae54
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40ae8f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40e1a4
push edi
call esi
test eax, eax
mov dword [0x5f4760], eax
je 0x40ae8f
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x5f4764], eax
call esi
cmp dword [0x5f45f8], 2
mov dword [0x5f4768], eax
jne 0x40ae54
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x5f4770], eax
je 0x40ae54
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x5f476c], eax
mov eax, dword [0x5f476c]
test eax, eax
je 0x40ae99
call eax
test eax, eax
je 0x40ae80
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x5f4770]
test eax, eax
je 0x40ae80
test byte [ebp - 8], 1
jne 0x40ae99
cmp dword [0x5f4604], 4
jb 0x40ae93
or byte [ebp + 0x12], 0x20
jmp 0x40aeb8
xor eax, eax
jmp 0x40aec8
or byte [ebp + 0x12], 4
jmp 0x40aeb8
mov eax, dword [0x5f4764]
test eax, eax
je 0x40aeb8
call eax
mov ebx, eax
test ebx, ebx
je 0x40aeb8
mov eax, dword [0x5f4768]
test eax, eax
je 0x40aeb8
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x5f4760]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b520
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 0x40b54e
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 0x40b555
cmp ebx, dword [eax + 4]
jae 0x40b555
xor eax, eax
jmp 0x40b745
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40b566
xor eax, eax
inc eax
jmp 0x40b744
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40b57c
cmp ecx, edx
jae 0x40b6c1
cmp dword [eax + 4], 0
je 0x40b585
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40b56d
cmp dword [ebp + 8], 0
je 0x40b5a7
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40b6c1
cmp eax, esi
jae 0x40b6c1
mov eax, dword [0x5f4778]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40b5cc
cmp dword [esi*4 + 0x5f4780], edi
je 0x40b6c5
inc esi
cmp esi, eax
jl 0x40b5ba
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b741
cmp dword [ebp - 8], 0x1000000
jne 0x40b741
test byte [ebp - 0xc], 0xcc
je 0x40b64a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40b741
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40b741
cmp word [eax + 0x18], 0x10b
jne 0x40b741
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40b741
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40b64a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40b64a
test byte [ecx + 0x27], 0x80
jne 0x40b6c1
push 1
push 0x5f47c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40b55e
mov ecx, dword [0x5f4778]
test ecx, ecx
mov edx, ecx
jle 0x40b67e
lea eax, [ecx*4 + 0x5f477c]
cmp dword [eax], edi
je 0x40b67e
dec edx
sub eax, 4
test edx, edx
jg 0x40b672
test edx, edx
jne 0x40b6af
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40b68b
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40b6a3
lea eax, [edx*4 + 0x5f4780]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40b691
cmp ecx, 0x10
jge 0x40b6af
inc ecx
mov dword [0x5f4778], ecx
push 0
push 0x5f47c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40b55e
xor eax, eax
jmp 0x40b744
test esi, esi
jle 0x40b55e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x5f47c0
call ebx
test eax, eax
jne 0x40b55e
cmp dword [esi*4 + 0x5f4780], edi
je 0x40b71b
mov eax, dword [0x5f4778]
lea esi, [eax - 1]
test esi, esi
jl 0x40b709
cmp dword [esi*4 + 0x5f4780], edi
je 0x40b705
dec esi
jns 0x40b6f9
test esi, esi
jge 0x40b719
cmp eax, 0x10
jge 0x40b714
inc eax
mov dword [0x5f4778], eax
lea esi, [eax - 1]
jmp 0x40b71b
je 0x40b733
xor ecx, ecx
test esi, esi
jl 0x40b733
lea eax, [ecx*4 + 0x5f4780]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40b721
push 0
push 0x5f47c0
call ebx
jmp 0x40b55e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40bcef
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x5f5a64]
push edi
jae 0x40bec4
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x5f5a80]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40bec4
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40bd9a
test dl, 2
jne 0x40bd9a
test dl, 0x48
je 0x40bd64
cmp byte [eax + 5], 0xa
je 0x40bd64
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bdad
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40bd95
mov dword [0x5f45f0], ecx
jmp 0x40becb
cmp eax, 0x6d
jne 0x40bda1
xor eax, eax
jmp 0x40bed8
push eax
call fcn.0040a235
pop ecx
jmp 0x40bed5
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40bebf
test eax, eax
je 0x40bdd4
cmp byte [ebx], 0xa
jne 0x40bdd4
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40bddd
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40beb9
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40bea9
cmp al, 0xd
je 0x40be0f
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40be9b
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40be29
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40be24
add dword [ebp - 8], 2
jmp 0x40be7d
mov dword [ebp - 8], eax
jmp 0x40be97
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x40be51
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40be97
cmp dword [ebp - 0x10], 0
je 0x40be97
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40be72
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40be7d
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40be9a
cmp ebx, dword [ebp + 0xc]
jne 0x40be82
cmp byte [ebp - 1], 0xa
jne 0x40be82
mov byte [ebx], 0xa
jmp 0x40be9a
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00409ebd
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40be9b
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40bdf3
jmp 0x40beb9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40beb9
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40bed8
and dword [0x5f45f0], 0
mov dword [0x5f45ec], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40bedd
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00409b40
mov eax, dword [0x40f174]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x5f5a64]
mov dword [ebp - 4], eax
jae 0x40c020
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x5f5a80]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40c020
push 1
push esi
push ebx
call fcn.00409ebd
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x40c02a
push 2
push esi
push ebx
call fcn.00409ebd
add esp, 0xc
cmp eax, 0xffffffff
je 0x40c02a
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40bfca
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.0040a980
push 0x8000
push ebx
call fcn.0040c601
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40bf89
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00406c4f
add esp, 0xc
cmp eax, 0xffffffff
je 0x40bfa7
sub edi, eax
test edi, edi
jg 0x40bf7e
jmp 0x40bfbd
cmp dword [0x5f45f0], 5
jne 0x40bfba
mov dword [0x5f45ec], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040c601
pop ecx
pop ecx
jmp 0x40c00a
jge 0x40c00a
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00409ebd
push ebx
call fcn.0040a67e
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x40c00a
mov dword [0x5f45ec], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5f45f0], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.00409ebd
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40c02d
mov dword [0x5f45ec], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0040a192
leave
ret
Function at 0x417990
Capabilities:
Encode data using xor

Disassembly:
mov ecx, edx
mov edx, eax
xor eax, eax
rol ax, 5
xor al, byte [edx]
inc edx
dec ecx
jne 0x417996
ret

Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43000c
nop
nop
pop eax
nop
nop
nop
nop
add eax, 0x403d2c
sub eax, 0x403cd2
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x40142c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401443
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x401478
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x401474
cmp edi, eax
jae 0x401478
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x401466
cmp edi, eax
jb 0x40147c
xor eax, eax
jmp 0x401486
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret

Function at 0x401713
Capabilities:
Set registry value

Disassembly:
push 4
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0xc]
push 4
push 0
push dword [esp + 0x18]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
ret 0xc

Function at 0x401789
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi]
and dword [esi], 0
add eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push 0
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4017ec
cmp dword [ebp + 0xc], 1
je 0x4017c5
cmp dword [ebp + 0xc], 2
je 0x4017c5
push 0xd
pop eax
jmp 0x4017ec
test edi, edi
mov eax, dword [ebp - 4]
je 0x4017e6
test eax, eax
je 0x4017e2
test al, 1
jne 0x4017c0
mov ecx, eax
shr ecx, 1
cmp word [edi + ecx*2 - 2], 0
je 0x4017e6
jmp 0x4017c0
and word [edi], 0
shr eax, 1
mov dword [esi], eax
xor eax, eax
leave
ret 8

Function at 0x401f0b
Capabilities:
Read .ini file

Disassembly:
push ebp
lea ebp, [esp - 0x18c]
sub esp, 0x20c
mov eax, dword [0x4db020]
xor eax, ebp
mov dword [ebp + 0x188], eax
test esi, esi
mov eax, dword [ebp + 0x194]
mov dword [ebp - 0x80], eax
je 0x401f88
test edi, edi
je 0x401f88
and word [ebp - 0x78], 0
push 0x1fe
lea eax, [ebp - 0x76]
push 0
push eax
mov dword [ebp - 0x7c], 0x80004005
call sub.MSVCR80.dll_memset
add esp, 0xc
push esi
push pe_nt_image_headers32
lea eax, [ebp - 0x78]
push eax
push 0
push edi
push str.SPCfg
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x401f83
mov ecx, dword [ebp - 0x80]
lea eax, [ebp - 0x78]
push eax
call dword [0x4aa3c4]
and dword [ebp - 0x7c], 0
mov eax, dword [ebp - 0x7c]
jmp 0x401f8d
mov eax, 0x80004005
mov ecx, dword [ebp + 0x188]
xor ecx, ebp
call fcn.00495616
add ebp, 0x18c
leave
ret
Function at 0x4021e8
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x4db020]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
test esi, esi
jne 0x402209
mov eax, 0x80004005
jmp 0x402288
and word [ebp - 0x804], 0
push ebx
push 0x7fe
lea eax, [ebp - 0x802]
push 0
push eax
mov ebx, 0x80004005
call sub.MSVCR80.dll_memset
add esp, 0xc
push esi
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0
mov eax, str.SPRoot
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x402285
lea eax, [ebp - 0x804]
mov esi, 0x4e1040
push eax
mov ecx, esi
call dword [0x4aa3c4]
mov eax, dword [0x4e1054]
dec eax
push eax
mov ecx, esi
call dword [sym.imp.MSVCP80.dll_public:_wchar_t____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator___unsigned_int_]
cmp word [eax], 0x5c
je 0x402283
push 0x4ab2c0
mov ecx, esi
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::append_wchar_t_const__]
xor ebx, ebx
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00495616
leave
ret

Function at 0x402304
Capabilities:
Read .ini file

Disassembly:
push ebp
lea ebp, [esp - 0x78c]
sub esp, 0x80c
mov eax, dword [0x4db020]
xor eax, ebp
mov dword [ebp + 0x788], eax
test esi, esi
mov eax, dword [ebp + 0x794]
mov dword [ebp - 0x80], eax
je 0x402381
test edi, edi
je 0x402381
and word [ebp - 0x78], 0
push 0x7fe
lea eax, [ebp - 0x76]
push 0
push eax
mov dword [ebp - 0x7c], 0x80004005
call sub.MSVCR80.dll_memset
add esp, 0xc
push esi
push 0x400
lea eax, [ebp - 0x78]
push eax
push 0
push edi
push str.ProductInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x40237c
mov ecx, dword [ebp - 0x80]
lea eax, [ebp - 0x78]
push eax
call dword [0x4aa3c4]
and dword [ebp - 0x7c], 0
mov eax, dword [ebp - 0x7c]
jmp 0x402386
mov eax, 0x80004005
mov ecx, dword [ebp + 0x788]
xor ecx, ebp
call fcn.00495616
add ebp, 0x78c
leave
ret