joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4083d0
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x138
mov eax, dword [ecx + 0xc0]
push esi
xor esi, esi
cmp eax, esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 4], esi
jle 0x408599
push ebx
push ebp
push edi
lea ebp, [ecx + 0xd0]
lea esp, [esp]
mov eax, dword [ebp + 0x14]
mov ebx, 0x10
cmp eax, ebx
jb 0x408411
mov eax, dword [ebp]
jmp 0x408413
mov eax, ebp
mov edx, dword [ebp - 8]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x408435
mov dword [ebp + 0x50], esi
jmp 0x408565
cmp dword [ebp + 0x30], ebx
mov dword [esp + 0x1c], 0x104
jb 0x408447
mov eax, dword [ebp + 0x1c]
jmp 0x40844a
lea eax, [ebp + 0x1c]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x2c]
push ecx
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x408472
mov dword [ebp + 0x50], esi
jmp 0x408565
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408484
sub eax, edx
cmp byte [esp + eax + 0x43], 0x5c
jne 0x4084b1
lea eax, [esp + 0x44]
lea edx, [eax + 1]
jmp 0x4084a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084a0
sub eax, edx
push eax
lea ecx, [esp + 0x48]
push ecx
jmp 0x4084df
lea edi, [esp + 0x44]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4084b6
mov dx, word [0x420718]
lea eax, [esp + 0x44]
mov word [edi], dx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084d0
sub eax, edx
push eax
lea eax, [esp + 0x48]
push eax
lea esi, [ebp + 0x34]
mov ecx, esi
call fcn.00401d80
push str.opera.exe
lea ecx, [esp + 0x2c]
push esi
push ecx
call fcn.00404ae0
mov ecx, dword [eax + 0x18]
add esp, 0xc
cmp ecx, ebx
jb 0x408508
mov eax, dword [eax + 4]
jmp 0x40850b
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40851b
xor eax, eax
jmp 0x408526
and al, 0x10
xor edx, edx
cmp al, 0x10
setne dl
mov eax, edx
test eax, eax
mov eax, dword [esp + 0x40]
sete bl
cmp eax, 0x10
jb 0x408541
mov eax, dword [esp + 0x2c]
push eax
call fcn.004186e7
add esp, 4
xor eax, eax
xor esi, esi
test bl, bl
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], eax
mov byte [esp + 0x2c], al
jne 0x408562
mov eax, 1
mov dword [esp + 0x18], eax
mov dword [ebp + 0x50], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0xc0]
inc eax
add ebp, 0xb0
cmp eax, edx
mov dword [esp + 0x10], eax
jl 0x408400
cmp dword [esp + 0x18], esi
pop edi
pop ebp
pop ebx
je 0x408599
xor eax, eax
pop esi
add esp, 0x138
ret
mov eax, 1
pop esi
add esp, 0x138
ret
Function at 0x40de67
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.0040e060
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40df02
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 [0x42b6f8]
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 0x40df02
cmp eax, 1
je 0x40df23
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 0x40df02
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40decf
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40defe
xor eax, eax
inc eax
jmp 0x40df42
cmp edi, eax
jae 0x40df06
xor eax, eax
jmp 0x40df42
cmp eax, esi
jae 0x40df0d
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 [0x42b6f8]
jmp 0x40df26
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 0x40e4f6
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x422668
call fcn.0040f22c
mov edi, 0x94
mov eax, edi
call fcn.0040e060
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 [0x42b6f8], ecx
mov eax, dword [esi + 4]
mov dword [0x42b704], eax
mov edx, dword [esi + 8]
mov dword [0x42b708], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42b6fc], esi
cmp ecx, 2
je 0x40e556
or esi, 0x8000
mov dword [0x42b6fc], esi
shl eax, 8
add eax, edx
mov dword [0x42b700], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40e591
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40e591
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40e5a9
cmp eax, 0x20b
je 0x40e596
mov dword [ebp - 0x1c], esi
jmp 0x40e5bd
cmp dword [ecx + 0x84], 0xe
jbe 0x40e591
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40e5b7
cmp dword [ecx + 0x74], 0xe
jbe 0x40e591
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004100fe
pop ecx
test eax, eax
jne 0x40e5d1
push 0x1c
call fcn.0040e4d2
pop ecx
call fcn.004112eb
test eax, eax
jne 0x40e5e2
push 0x10
call fcn.0040e4d2
pop ecx
call fcn.00413590
mov dword [ebp - 4], esi
call fcn.00413392
test eax, eax
jge 0x40e5fb
push 0x1b
call fcn.0040e4ad
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42cf80], eax
call fcn.00413270
mov dword [0x42b6dc], eax
call fcn.004131ce
test eax, eax
jge 0x40e621
push 8
call fcn.0040e4ad
pop ecx
call fcn.00412f9b
test eax, eax
jge 0x40e632
push 9
call fcn.0040e4ad
pop ecx
push 1
call fcn.0040fcb9
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40e648
push eax
call fcn.0040e4ad
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00412f3e
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40e669
movzx eax, word [ebp - 0x40]
jmp 0x40e66c
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00407150
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40e68a
push edi
call fcn.0040fde6
call fcn.0040fe08
jmp 0x40e6bc
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040f267
ret
Function at 0x40fd23
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4226f0
call fcn.0040f22c
push 8
call fcn.004102a2
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42b738], esi
jne 0x40fd57
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42b734], esi
mov al, byte [ebp + 0x10]
mov byte [0x42b730], al
cmp dword [ebp + 0xc], edi
jne 0x40fda1
cmp dword [0x42cd4c], edi
je 0x40fd91
mov eax, dword [0x42cd48]
sub eax, 4
mov dword [0x42cd48], eax
cmp eax, dword [0x42cd4c]
jb 0x40fd91
mov eax, dword [eax]
cmp eax, edi
je 0x40fd72
call eax
jmp 0x40fd72
push 0x428074
mov eax, 0x42806c
call fcn.0040fca1
pop ecx
push 0x428080
mov eax, 0x428078
call fcn.0040fca1
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40fdd2
cmp dword [ebp + 0x10], edi
jne 0x40fde0
mov dword [0x42b738], esi
push dword [ebp + 8]
call fcn.0040fc5f
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40fddf
push 8
call fcn.004101ed
pop ecx
ret
call fcn.0040f267
ret
Function at 0x412060
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 0x41208e
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 0x412095
cmp ebx, dword [eax + 4]
jae 0x412095
xor eax, eax
jmp 0x412285
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4120a6
xor eax, eax
inc eax
jmp 0x412284
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4120bc
cmp ecx, edx
jae 0x412201
cmp dword [eax + 4], 0
je 0x4120c5
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4120ad
cmp dword [ebp + 8], 0
je 0x4120e7
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x412201
cmp eax, esi
jae 0x412201
mov eax, dword [0x42b8b8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41210c
cmp dword [esi*4 + 0x42b8c0], edi
je 0x412205
inc esi
cmp esi, eax
jl 0x4120fa
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x412281
cmp dword [ebp - 8], 0x1000000
jne 0x412281
test byte [ebp - 0xc], 0xcc
je 0x41218a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x412281
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x412281
cmp word [eax + 0x18], 0x10b
jne 0x412281
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x412281
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41218a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41218a
test byte [ecx + 0x27], 0x80
jne 0x412201
push 1
push 0x42b900
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41209e
mov ecx, dword [0x42b8b8]
test ecx, ecx
mov edx, ecx
jle 0x4121be
lea eax, [ecx*4 + 0x42b8bc]
cmp dword [eax], edi
je 0x4121be
dec edx
sub eax, 4
test edx, edx
jg 0x4121b2
test edx, edx
jne 0x4121ef
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4121cb
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4121e3
lea eax, [edx*4 + 0x42b8c0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4121d1
cmp ecx, 0x10
jge 0x4121ef
inc ecx
mov dword [0x42b8b8], ecx
push 0
push 0x42b900
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41209e
xor eax, eax
jmp 0x412284
test esi, esi
jle 0x41209e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x42b900
call ebx
test eax, eax
jne 0x41209e
cmp dword [esi*4 + 0x42b8c0], edi
je 0x41225b
mov eax, dword [0x42b8b8]
lea esi, [eax - 1]
test esi, esi
jl 0x412249
cmp dword [esi*4 + 0x42b8c0], edi
je 0x412245
dec esi
jns 0x412239
test esi, esi
jge 0x412259
cmp eax, 0x10
jge 0x412254
inc eax
mov dword [0x42b8b8], eax
lea esi, [eax - 1]
jmp 0x41225b
je 0x412273
xor ecx, ecx
test esi, esi
jl 0x412273
lea eax, [ecx*4 + 0x42b8c0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x412261
push 0
push 0x42b900
call ebx
jmp 0x41209e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x412c2a
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4288f0]
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 + 0x428e58]
je 0x412c5f
inc eax
cmp eax, 0x13
jb 0x412c50
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x428e58]
jne 0x412d85
mov eax, dword [0x42b6e4]
cmp eax, 1
je 0x412d5d
cmp eax, edx
jne 0x412c8f
cmp dword [0x4288e4], 1
je 0x412d5d
cmp ecx, 0xfc
je 0x412d85
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 0x412cc5
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00411db0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040ea50
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x412cf9
mov eax, edi
push eax
call fcn.0040ea50
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x422db8
push edi
call fcn.0040dbb0
add esp, 0x10
push edi
call fcn.0040ea50
push dword [esi + 0x428e5c]
mov ebx, eax
call fcn.0040ea50
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040e060
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00411db0
push edi
push ebx
call fcn.00411dc0
push 0x422d98
push ebx
call fcn.00411dc0
push dword [esi + 0x428e5c]
push ebx
call fcn.00411dc0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004158d6
add esp, 0x2c
jmp 0x412d85
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x428e5c]
push dword [esi]
call fcn.0040ea50
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.0040ea3e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret

Function at 0x414152
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x414180
add al, 0x40
mov byte [ebp + 8], al
lea eax, [ebp + 8]
push eax
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x414185
cmp eax, 1
je 0x414185
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x414189
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4288f0]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x414201
push ebx
call fcn.00414152
test eax, eax
pop ecx
jne 0x4141d0
call fcn.0040fe5a
mov dword [eax], 0xf
call fcn.0040fe51
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
pop ebx
call fcn.0040ea3e
leave
ret
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x414213
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4141c3
inc eax
cmp eax, 0x104
ja 0x4141c3
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x41424b
cmp eax, dword [ebp + 0x10]
jg 0x41422e
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040de55
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x414260
call fcn.0040fe51
mov dword [eax], 0xc
jmp 0x4141c3
cmp eax, dword [ebp + 0x10]
jle 0x414260
call fcn.0040fe51
mov dword [eax], 0x22
jmp 0x4141c3
lea eax, [ebp - 0x108]
push eax
push ecx
call fcn.00411db0
pop ecx
pop ecx
jmp 0x4141c5
Function at 0x415407
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4288f0]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x415438
xor eax, eax
jmp 0x4155c1
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x42cc20]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x415474
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00416707
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41554f
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x41558d
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x4154d8
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4154c9
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x4154a9
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415518
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x415521
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x41549a
jmp 0x415523
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x4155bc
cmp dword [ebp - 0x6c], edi
je 0x41558d
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x415582
call fcn.0040fe51
mov dword [eax], 9
call fcn.0040fe5a
mov dword [eax], esi
jmp 0x4155b7
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415577
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x415523
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x415523
push dword [ebp - 0x6c]
call fcn.0040fe63
pop ecx
jmp 0x4155b7
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4155a5
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x4155a5
xor eax, eax
jmp 0x4155bf
call fcn.0040fe51
mov dword [eax], 0x1c
call fcn.0040fe5a
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4155bf
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0040ea3e
add ebp, 0x3a0
leave
ret
Function at 0x4158d6
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x42bb7c], ebx
push esi
push edi
jne 0x415956
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x415991
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x42379c
push edi
call esi
test eax, eax
mov dword [0x42bb7c], eax
je 0x415991
push str.GetActiveWindow
push edi
call esi
push 0x423778
push edi
mov dword [0x42bb80], eax
call esi
cmp dword [0x42b6f8], 2
mov dword [0x42bb84], eax
jne 0x415956
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x42bb8c], eax
je 0x415956
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42bb88], eax
mov eax, dword [0x42bb88]
test eax, eax
je 0x41599b
call eax
test eax, eax
je 0x415982
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x42bb8c]
test eax, eax
je 0x415982
test byte [ebp - 8], 1
jne 0x41599b
cmp dword [0x42b704], 4
jb 0x415995
or byte [ebp + 0x12], 0x20
jmp 0x4159ba
xor eax, eax
jmp 0x4159ca
or byte [ebp + 0x12], 4
jmp 0x4159ba
mov eax, dword [0x42bb80]
test eax, eax
je 0x4159ba
call eax
mov ebx, eax
test ebx, ebx
je 0x4159ba
mov eax, dword [0x42bb84]
test eax, eax
je 0x4159ba
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x42bb7c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41788d
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x4178a6
or eax, 0xffffffff
jmp 0x417907
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x417903
push 0x3d
push esi
call fcn.0040eafb
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x417903
cmp esi, eax
je 0x417903
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x42b718]
sete cl
cmp eax, dword [0x42b71c]
mov dword [ebp - 8], ecx
jne 0x4178e9
mov edi, eax
call fcn.0041782c
mov dword [0x42b718], eax
cmp eax, ebx
jne 0x417942
cmp dword [ebp + 0xc], ebx
je 0x41790b
cmp dword [0x42b720], ebx
je 0x41790b
call fcn.004169dc
test eax, eax
je 0x417942
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x417914
xor eax, eax
jmp 0x417906
push 4
call fcn.0040de55
cmp eax, ebx
pop ecx
mov dword [0x42b718], eax
je 0x417903
mov dword [eax], ebx
cmp dword [0x42b720], ebx
jne 0x417942
push 4
call fcn.0040de55
cmp eax, ebx
pop ecx
mov dword [0x42b720], eax
je 0x417903
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x42b718]
call fcn.004177df
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x4179a3
cmp dword [esi], ebx
je 0x4179a3
lea esi, [esi + edi*4]
push dword [esi]
call fcn.0040d29d
cmp dword [ebp - 8], ebx
pop ecx
jne 0x417986
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x4179e4
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x41797d
mov eax, edi
shl eax, 2
push eax
push dword [0x42b718]
call fcn.0040eb76
cmp eax, ebx
pop ecx
pop ecx
je 0x4179e4
jmp 0x4179df
cmp dword [ebp - 8], ebx
jne 0x417a4f
cmp edi, ebx
jge 0x4179b2
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x42b718]
call fcn.0040eb76
cmp eax, ebx
pop ecx
pop ecx
je 0x417903
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x42b718], eax
cmp dword [ebp + 0xc], ebx
je 0x417a39
push dword [ebp - 4]
call fcn.0040ea50
inc eax
inc eax
push eax
call fcn.0040de55
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x417a39
push dword [ebp - 4]
push esi
call fcn.00411db0
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x417a32
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.0040d29d
pop ecx
cmp dword [ebp - 8], ebx
je 0x417a47
push dword [ebp - 4]
call fcn.0040d29d
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x417906
push dword [ebp - 4]
call fcn.0040d29d
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x417910
Function at 0x41c4b0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x4288f0]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, pe_nt_image_headers32
cmp esi, eax
ja 0x41c4ff
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x41c4ff
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x41c50b
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [ebp - 4]
pop esi
call fcn.0040ea3e
leave
ret 8

Function at 0x41d5bf
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x41d5f4
cmp edi, dword [esi + 0xc]
jge 0x41d5f4
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41d5f4
cmp edi, dword [eax + 8]
jge 0x41d5f4
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x41d5f6
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x41d6a2
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x41d6d6
jmp fcn.004180b7
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret