joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401f90
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push edi
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [str.SOFTWAREKWMUSIC]
lea eax, [esp + 0x18]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], 1
mov byte [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402012
mov ecx, dword [0x40f094]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
push esi
lea eax, [esp + 0x14]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x402007
mov byte [esi], 0
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402017
sub eax, edx
mov dword [esp + 0x18], eax
jne 0x40202d
pop edi
pop esi
xor al, al
pop ebx
pop ecx
ret
pop edi
mov byte [esi + ebx - 1], 0
pop esi
mov al, 1
pop ebx
pop ecx
ret

Function at 0x4020e0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x108
mov eax, dword [0x40f200]
push ebx
mov ebx, dword [esp + 0x110]
push esi
mov esi, dword [esp + 0x118]
push edi
mov dword [esp + 0x110], eax
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0xc]
push 0x104
push eax
call fcn.00402040
add esp, 8
test al, al
je 0x40214a
lea ecx, [esp + 0xc]
push ecx
push esi
push ebx
push 0
push str.Version
push str.Config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x402162
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x104]
call fcn.0040331e
add esp, 0x108
ret
mov ecx, dword [esp + 0x110]
pop edi
mov byte [ebx + esi - 1], 0
pop esi
mov al, 1
pop ebx
call fcn.0040331e
add esp, 0x108
ret
Function at 0x4023c0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
mov eax, ebp
cdq
mov edi, 3
idiv edi
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edi, ebp
sub edi, edx
test edi, edi
jle 0x40244b
lea edx, [edi - 1]
mov eax, 0xaaaaaaab
mul edx
shr edx, 1
inc edx
push ebx
nop
movzx eax, byte [esi]
shr eax, 2
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
movzx ebx, byte [esi + 1]
xor eax, eax
mov al, byte [esi]
shr ebx, 4
inc ecx
add esi, 3
and eax, 3
shl eax, 4
mov al, byte [eax + ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
movzx ebx, byte [esi - 1]
xor eax, eax
mov al, byte [esi - 2]
shr ebx, 6
inc ecx
and eax, 0xf
mov al, byte [ebx + eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
xor eax, eax
mov al, byte [esi - 1]
inc ecx
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
inc ecx
dec edx
jne 0x4023f0
pop ebx
sub ebp, edi
cmp ebp, 1
jne 0x402489
movzx edx, byte [esi]
shr edx, 2
mov al, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
xor edx, edx
mov dl, byte [esi]
inc ecx
pop edi
pop esi
pop ebp
and edx, 3
shl edx, 4
mov al, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
inc ecx
mov byte [ecx], 0x3d
inc ecx
mov byte [ecx], 0x3d
inc ecx
mov eax, ecx
mov byte [ecx], 0
sub eax, dword [esp + 4]
ret
cmp ebp, 2
jne 0x4024ce
movzx edx, byte [esi]
shr edx, 2
mov al, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], al
movzx eax, byte [esi + 1]
xor edx, edx
mov dl, byte [esi]
shr eax, 4
inc ecx
and edx, 3
shl edx, 4
mov dl, byte [edx + eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], dl
xor eax, eax
mov al, byte [esi + 1]
inc ecx
and eax, 0xf
mov dl, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0]
mov byte [ecx], dl
inc ecx
mov byte [ecx], 0x3d
inc ecx
pop edi
mov eax, ecx
mov byte [ecx], 0
mov ecx, dword [esp + 0xc]
pop esi
sub eax, ecx
pop ebp
ret
Function at 0x402570
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x10c
mov eax, dword [0x40f200]
push ebx
mov ebx, dword [esp + 0x118]
push esi
mov esi, dword [esp + 0x118]
push edi
mov dword [esp + 0x114], eax
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.00402040
add esp, 8
test al, al
je 0x4025ef
lea ecx, [esp + 0x10]
push ecx
push ebx
push esi
push 0
push str.userfile
push str.Config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4025ef
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4025e0
sub eax, edx
mov dword [esp + 0xc], eax
jne 0x402607
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x108]
call fcn.0040331e
add esp, 0x10c
ret
mov ecx, dword [esp + 0x114]
pop edi
mov byte [esi + ebx - 1], 0
pop esi
mov al, 1
pop ebx
call fcn.0040331e
add esp, 0x10c
ret

Function at 0x402630
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x40f200]
mov ecx, dword [ebp + 0xc]
mov edx, ecx
push ebx
mov ebx, dword [ebp + 8]
shr ecx, 2
push esi
push edi
mov dword [esp + 0x224], eax
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4026ab
lea ecx, [esp + 0x118]
push 0x104
push ecx
call fcn.00402570
add esp, 8
test al, al
jne 0x4026c0
xor al, al
mov ecx, dword [esp + 0x224]
call fcn.0040331e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
mov edx, ebx
mov ecx, eax
sub edx, ecx
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4026d0
mov edi, ebx
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4026e0
mov dx, word [0x40c360]
lea eax, [esp + 0x118]
mov word [edi], dx
mov edx, eax
jmp 0x402700
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402700
sub eax, edx
dec ebx
mov edi, ebx
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402710
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x224]
mov al, 1
call fcn.0040331e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402fc6
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.004032b0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403061
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 [0x410074]
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 0x403061
cmp eax, 1
je 0x403082
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 0x403061
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40302e
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40305d
xor eax, eax
inc eax
jmp 0x4030a1
cmp edi, eax
jae 0x403065
xor eax, eax
jmp 0x4030a1
cmp eax, esi
jae 0x40306c
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 [0x410074]
jmp 0x403085
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 0x404040
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4100b4], esi
push edi
jne 0x404060
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 [0x4100b0], esi
mov byte [0x4100ac], al
jne 0x4040c6
mov ecx, dword [0x4117d0]
test ecx, ecx
je 0x4040a7
mov eax, dword [0x4117cc]
sub eax, 4
cmp eax, ecx
jmp 0x4040a0
mov eax, dword [eax]
test eax, eax
je 0x404092
call eax
mov eax, dword [0x4117cc]
sub eax, 4
cmp eax, dword [0x4117d0]
mov dword [0x4117cc], eax
jae 0x40408a
mov eax, 0x40f03c
mov esi, 0x40f044
cmp eax, esi
mov edi, eax
jae 0x4040c6
mov eax, dword [edi]
test eax, eax
je 0x4040bf
call eax
add edi, 4
cmp edi, esi
jb 0x4040b7
mov eax, 0x40f048
mov esi, 0x40f050
cmp eax, esi
mov edi, eax
jae 0x4040e5
mov eax, dword [edi]
test eax, eax
je 0x4040de
call eax
add edi, 4
cmp edi, esi
jb 0x4040d6
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4040ff
push dword [ebp + 8]
mov dword [0x4100b4], 1
call fcn.00403fa6
pop ebp
ret
Function at 0x4042da
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x40c4a0
call fcn.00405690
mov edi, 0x94
mov eax, edi
call fcn.004032b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x410074], ecx
mov eax, dword [esi + 4]
mov dword [0x410080], eax
mov edx, dword [esi + 8]
mov dword [0x410084], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x410078], esi
cmp ecx, 2
je 0x40433a
or esi, 0x8000
mov dword [0x410078], esi
shl eax, 8
add eax, edx
mov dword [0x41007c], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x404373
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404373
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40438b
cmp eax, 0x20b
je 0x404378
mov dword [ebp - 0x1c], edi
jmp 0x40439f
cmp dword [ecx + 0x84], 0xe
jbe 0x404373
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x404399
cmp dword [ecx + 0x74], 0xe
jbe 0x404373
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00405858
pop ecx
test eax, eax
jne 0x4043cb
cmp dword [0x4100c0], 2
je 0x4043b8
call fcn.00408c1f
push 0x1c
call fcn.00408aa8
push 0xff
call fcn.00403fa6
pop ecx
pop ecx
call fcn.00408810
mov dword [ebp - 4], edi
call fcn.004091c0
test eax, eax
jge 0x4043e4
push 0x1b
call fcn.004042b5
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4117c4], eax
call fcn.0040909e
mov dword [0x4100b8], eax
call fcn.00408ffc
test eax, eax
jge 0x40440a
push 8
call fcn.004042b5
pop ecx
call fcn.00408dc9
test eax, eax
jge 0x40441b
push 9
call fcn.004042b5
pop ecx
push 1
call fcn.00403fd6
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x404431
push eax
call fcn.004042b5
pop ecx
mov eax, dword [0x410094]
mov dword [0x410098], eax
push eax
push dword [0x41008c]
push dword [0x410088]
call fcn.00401c60
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x404460
push esi
call fcn.00404101
call fcn.00404123
jmp 0x404492
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.004056cb
ret
Function at 0x4063cc
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 0x4063fa
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 0x406401
cmp ebx, dword [eax + 4]
jae 0x406401
xor eax, eax
jmp 0x4065f1
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x406412
xor eax, eax
inc eax
jmp 0x4065f0
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x406428
cmp ecx, edx
jae 0x40656d
cmp dword [eax + 4], 0
je 0x406431
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x406419
cmp dword [ebp + 8], 0
je 0x406453
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40656d
cmp eax, esi
jae 0x40656d
mov eax, dword [0x4100e8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x406478
cmp dword [esi*4 + 0x4100f0], edi
je 0x406571
inc esi
cmp esi, eax
jl 0x406466
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4065ed
cmp dword [ebp - 8], 0x1000000
jne 0x4065ed
test byte [ebp - 0xc], 0xcc
je 0x4064f6
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4065ed
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4065ed
cmp word [eax + 0x18], 0x10b
jne 0x4065ed
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4065ed
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4064f6
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4064f6
test byte [ecx + 0x27], 0x80
jne 0x40656d
push 1
push 0x410130
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40640a
mov ecx, dword [0x4100e8]
test ecx, ecx
mov edx, ecx
jle 0x40652a
lea eax, [ecx*4 + 0x4100ec]
cmp dword [eax], edi
je 0x40652a
dec edx
sub eax, 4
test edx, edx
jg 0x40651e
test edx, edx
jne 0x40655b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x406537
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40654f
lea eax, [edx*4 + 0x4100f0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40653d
cmp ecx, 0x10
jge 0x40655b
inc ecx
mov dword [0x4100e8], ecx
push 0
push 0x410130
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40640a
xor eax, eax
jmp 0x4065f0
test esi, esi
jle 0x40640a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x410130
call ebx
test eax, eax
jne 0x40640a
cmp dword [esi*4 + 0x4100f0], edi
je 0x4065c7
mov eax, dword [0x4100e8]
lea esi, [eax - 1]
test esi, esi
jl 0x4065b5
cmp dword [esi*4 + 0x4100f0], edi
je 0x4065b1
dec esi
jns 0x4065a5
test esi, esi
jge 0x4065c5
cmp eax, 0x10
jge 0x4065c0
inc eax
mov dword [0x4100e8], eax
lea esi, [eax - 1]
jmp 0x4065c7
je 0x4065df
xor ecx, ecx
test esi, esi
jl 0x4065df
lea eax, [ecx*4 + 0x4100f0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4065cd
push 0
push 0x410130
call ebx
jmp 0x40640a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4075b6
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 [0x411444]
push edi
jae 0x40778b
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x411460]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40778b
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x407661
test dl, 2
jne 0x407661
test dl, 0x48
je 0x40762b
cmp byte [eax + 5], 0xa
je 0x40762b
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 0x407674
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40765c
mov dword [0x41006c], ecx
jmp 0x407792
cmp eax, 0x6d
jne 0x407668
xor eax, eax
jmp 0x40779f
push eax
call fcn.00407af8
pop ecx
jmp 0x40779c
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x407786
test eax, eax
je 0x40769b
cmp byte [ebx], 0xa
jne 0x40769b
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x4076a4
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 0x407780
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x407770
cmp al, 0xd
je 0x4076d6
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x407762
dec ecx
cmp dword [ebp - 8], ecx
jae 0x4076f0
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x4076eb
add dword [ebp - 8], 2
jmp 0x407744
mov dword [ebp - 8], eax
jmp 0x40775e
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 0x407718
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40775e
cmp dword [ebp - 0x10], 0
je 0x40775e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x407739
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x407744
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x407761
cmp ebx, dword [ebp + 0xc]
jne 0x407749
cmp byte [ebp - 1], 0xa
jne 0x407749
mov byte [ebx], 0xa
jmp 0x407761
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00408328
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x407762
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x4076ba
jmp 0x407780
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x407780
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 0x40779f
and dword [0x41006c], 0
mov dword [0x410068], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408138
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x411444]
mov eax, dword [0x40f200]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x4082fe
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x411460]
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 0x4082fe
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x4081a2
xor eax, eax
jmp 0x408312
test al, 0x20
je 0x4081b3
push 2
push edi
push edi
push ecx
call fcn.0040a0a7
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x408288
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x4082cf
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x408215
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x408206
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 0x4081e8
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 0x408255
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x408261
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x4081dc
jmp 0x408263
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x4082f9
cmp dword [ebp + 0x3a4], edi
je 0x4082cf
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x4082c1
mov dword [0x41006c], eax
jmp 0x408305
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 0x4082b3
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x408263
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x408263
push dword [ebp + 0x3a4]
call fcn.00407af8
pop ecx
jmp 0x40830f
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4082e7
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40819b
mov dword [0x410068], 0x1c
mov dword [0x41006c], edi
jmp 0x40830f
sub eax, dword [ebp - 0x7c]
jmp 0x408312
and dword [0x41006c], 0
mov dword [0x410068], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040331e
add ebp, 0x39c
leave
ret
Function at 0x408aa8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40f200]
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 + 0x40f6a0]
je 0x408add
inc eax
cmp eax, 0x13
jb 0x408ace
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40f6a0]
jne 0x408c03
mov eax, dword [0x4100c0]
cmp eax, 1
je 0x408bdb
cmp eax, edx
jne 0x408b0d
cmp dword [0x40f284], 1
je 0x408bdb
cmp ecx, 0xfc
je 0x408c03
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 0x408b43
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00408040
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004044c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x408b77
mov eax, edi
push eax
call fcn.004044c0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40cbe4
push edi
call fcn.00408940
add esp, 0x10
push edi
call fcn.004044c0
push dword [esi + 0x40f6a4]
mov ebx, eax
call fcn.004044c0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004032b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408040
push edi
push ebx
call fcn.00408050
push 0x40cbe0
push ebx
call fcn.00408050
push dword [esi + 0x40f6a4]
push ebx
call fcn.00408050
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00409932
add esp, 0x2c
jmp 0x408c03
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40f6a4]
push dword [esi]
call fcn.004044c0
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.0040331e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x409932
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41031c], ebx
push esi
push edi
jne 0x4099b2
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4099ed
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x41031c], eax
je 0x4099ed
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x410320], eax
call esi
cmp dword [0x410074], 2
mov dword [0x410324], eax
jne 0x4099b2
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41032c], eax
je 0x4099b2
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x410328], eax
mov eax, dword [0x410328]
test eax, eax
je 0x4099f7
call eax
test eax, eax
je 0x4099de
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41032c]
test eax, eax
je 0x4099de
test byte [ebp - 8], 1
jne 0x4099f7
cmp dword [0x410080], 4
jb 0x4099f1
or byte [ebp + 0x12], 0x20
jmp 0x409a16
xor eax, eax
jmp 0x409a26
or byte [ebp + 0x12], 4
jmp 0x409a16
mov eax, dword [0x410320]
test eax, eax
je 0x409a16
call eax
mov ebx, eax
test ebx, ebx
je 0x409a16
mov eax, dword [0x410324]
test eax, eax
je 0x409a16
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41031c]
pop edi
pop esi
pop ebx
leave
ret