joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5d7e9d
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
pushal
mov edx, dword [ebp + 0xc]
sub eax, eax
mov ax, word [edx + 2]
mov dword [ebp - 0x118], eax
add edx, 0x14
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0x114], eax
mov eax, dword [edx + 0x38]
mov dword [ebp - 0x110], edx
lea edx, [ebp - 0xc]
mov ebx, dword [ebp + 8]
push edx
push 4
push eax
push dword [ebp - 0x114]
call dword [ebx + 0x24]
test eax, eax
je 0x5d7fee
mov byte [ebp - 0x10c], 0x53
mov byte [ebp - 0x10b], 0x65
mov byte [ebp - 0x10a], 0x74
mov byte [ebp - 0x109], 0x20
mov byte [ebp - 0x108], 0x49
mov byte [ebp - 0x107], 0x6d
mov byte [ebp - 0x106], 0x61
mov byte [ebp - 0x105], 0x67
mov byte [ebp - 0x104], 0x65
mov byte [ebp - 0x103], 0x20
mov byte [ebp - 0x102], 0x77
mov byte [ebp - 0x101], 0x72
mov byte [ebp - 0x100], 0x69
mov byte [ebp - 0xff], 0x74
mov byte [ebp - 0xfe], 0x61
mov byte [ebp - 0xfd], 0x62
mov byte [ebp - 0xfc], 0x6c
mov byte [ebp - 0xfb], 0x65
mov byte [ebp - 0xfa], 0x3a
mov byte [ebp - 0xf9], 0
mov eax, 1
mov eax, 1
test eax, eax
je 0x5d7fee
mov edx, dword [ebp - 0x110]
lea ebx, [edx + 0x60]
mov eax, dword [edx + 0x5c]
mov edx, 8
mul edx
add eax, ebx
mov dword [ebp - 8], eax
mov eax, 0x28
mov edx, dword [ebp - 0x118]
mul edx
add eax, dword [ebp - 8]
mov ebx, dword [ebp + 0x10]
sub eax, ebx
mov dword [ebp - 4], eax
mov edi, dword [ebp - 0x114]
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x118]
mov ebx, dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp - 0x114]
push ebx
push dword [ebp + 8]
call fcn.005d7ff8
test eax, eax
je 0x5d7fee
add ebx, 0x28
dec ecx
jne 0x5d7fc7
popal
mov eax, dword [ebp - 0x114]
leave
ret 0x10
popal
mov eax, 0
leave
ret 0x10

Function at 0x5d809e
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
pushal
mov edx, dword [ebp + 0xc]
mov ebx, dword [edx + 0x24]
and ebx, 0xe0000000
cmp ebx, 0xe0000000
jne 0x5d80c9
mov eax, 0x40
mov dword [ebp - 0x108], eax
jmp 0x5d812e
mov ebx, dword [edx + 0x24]
and ebx, 0x60000000
cmp ebx, 0x60000000
jne 0x5d80e7
mov eax, 0x20
mov dword [ebp - 0x108], eax
jmp 0x5d812e
mov ebx, dword [edx + 0x24]
and ebx, 0xc0000000
cmp ebx, 0xc0000000
jne 0x5d8105
mov eax, 4
mov dword [ebp - 0x108], eax
jmp 0x5d812e
mov ebx, dword [edx + 0x24]
and ebx, 0x40000000
cmp ebx, 0x40000000
jne 0x5d8123
mov eax, 2
mov dword [ebp - 0x108], eax
jmp 0x5d812e
mov eax, 1
mov dword [ebp - 0x108], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
add eax, dword [ebp + 0x10]
mov ebx, dword [edx + 8]
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x104]
push edx
push dword [ebp - 0x108]
push ebx
push eax
call dword [ecx + 0x24]
test eax, eax
je 0x5d816b
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
add eax, dword [ebp + 0x10]
mov eax, 1
popal
mov eax, 1
leave
ret 0x10
popal
sub eax, eax
leave
ret 0x10
Function at 0x5d8172
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
pushal
mov edx, dword [ebp + 8]
mov ax, word [edx]
cmp ax, 0x5a4d
jne 0x5d81a1
mov eax, dword [edx + 0x3c]
add edx, eax
mov eax, dword [edx]
cmp eax, 0x4550
jne 0x5d81a1
add edx, 4
mov dword [ebp - 4], edx
popal
mov eax, dword [ebp - 4]
leave
ret 8
popal
sub eax, eax
leave
ret 8

Function at 0x5d8dff
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
mov ecx, 3
mov edx, 1
push ecx
push dword [ebp + 8]
call fcn.005d8f04
rol eax, 8
push dword [ebp + 0xc]
push eax
call fcn.005d8f20
push edx
push dword [ebp + 0x10]
push eax
call fcn.005d8eec
inc edx
mov ebx, eax
push ecx
sub ecx, 3
push ecx
push dword [ebp + 8]
call fcn.005d8f04
pop ecx
xor eax, ebx
inc ecx
push ecx
push dword [ebp + 8]
push eax
call fcn.005d8ecb
push ecx
push dword [ebp + 8]
call fcn.005d8f04
mov ebx, eax
push ecx
sub ecx, 3
push ecx
push dword [ebp + 8]
call fcn.005d8f04
pop ecx
xor eax, ebx
inc ecx
push ecx
push dword [ebp + 8]
push eax
call fcn.005d8ecb
push ecx
push dword [ebp + 8]
call fcn.005d8f04
mov ebx, eax
push ecx
sub ecx, 3
push ecx
push dword [ebp + 8]
call fcn.005d8f04
pop ecx
xor eax, ebx
inc ecx
push ecx
push dword [ebp + 8]
push eax
call fcn.005d8ecb
push ecx
push dword [ebp + 8]
call fcn.005d8f04
mov ebx, eax
push ecx
sub ecx, 3
push ecx
push dword [ebp + 8]
call fcn.005d8f04
pop ecx
xor eax, ebx
inc ecx
push ecx
push dword [ebp + 8]
push eax
call fcn.005d8ecb
cmp ecx, 0x2b
jne 0x5d8e0f
leave
ret 0xc

Function at 0x5da4b4
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
pushal
mov byte [ebp - 0x118], 0x42
mov byte [ebp - 0x117], 0x72
mov byte [ebp - 0x116], 0x75
mov byte [ebp - 0x115], 0x74
mov byte [ebp - 0x114], 0x65
mov byte [ebp - 0x113], 0x66
mov byte [ebp - 0x112], 0x6f
mov byte [ebp - 0x111], 0x72
mov byte [ebp - 0x110], 0x63
mov byte [ebp - 0x10f], 0x69
mov byte [ebp - 0x10e], 0x6e
mov byte [ebp - 0x10d], 0x67
mov byte [ebp - 0x10c], 0x20
mov byte [ebp - 0x10b], 0x4b
mov byte [ebp - 0x10a], 0x65
mov byte [ebp - 0x109], 0x79
mov byte [ebp - 0x108], 0
mov eax, 1
lea edi, [ebp - 0x14]
mov ecx, 0x10
mov al, 0
mov byte [edi], al
inc edi
dec ecx
jne 0x5da544
mov eax, dword [ebp + 8]
push 4
push 0x3000
push 0xe9e40
push 0
call dword [eax + 0x20]
test eax, eax
je 0x5da5d6
mov dword [ebp - 4], eax
mov edi, eax
mov esi, dword [ebp + 0xc]
mov ecx, 0xe9e40
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
push dword [ebp + 0xc]
push 0xe9e40
call fcn.005da3fa
push 0xe9e40
push dword [ebp + 0xc]
call fcn.005d81a8
test eax, eax
jne 0x5da5b8
mov esi, dword [ebp - 4]
mov edi, dword [ebp + 0xc]
mov ecx, 0xe9e40
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x14]
push eax
call fcn.005da5dd
test eax, eax
je 0x5da5d6
jmp 0x5da574
mov eax, dword [ebp + 8]
push 0x8000
push 0
push dword [ebp - 4]
call dword [eax + 0x28]
test eax, eax
je 0x5da5d6
popal
mov eax, 1
leave
ret 8
popal
sub eax, eax
leave
ret 8
Function at 0x5da60b
Capabilities:
Terminate process

Disassembly:
call fcn.005da618
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
Function at 0x402360
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41530f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push esi
push edi
mov dword [esp + 8], 0
mov eax, dword [esp + 0x44]
push 0
mov esi, ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00402210
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x3c], 1
call fcn.00401b50
mov edi, eax
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 2
call fcn.00401b20
push edi
mov edi, dword [esp + 0x44]
push eax
push 0
push 0
push edi
mov ecx, esi
mov byte [esp + 0x4c], 3
call fcn.00401b80
lea ecx, [esp + 0x44]
mov dword [esp + 8], 1
mov byte [esp + 0x38], 2
call fcn.004010f0
lea ecx, [esp + 0xc]
mov byte [esp + 0x38], 1
call fcn.004010f0
lea ecx, [esp + 0x10]
mov byte [esp + 0x38], 0
call fcn.00401950
mov ecx, dword [esp + 0x30]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x34
ret 8

Function at 0x4025f0
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x402606
mov esi, str.English
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
setne al
pop esi
ret 4

Function at 0x402650
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x415338
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
lea ecx, [esp + 8]
call fcn.004017a0
mov eax, dword [esp + 8]
mov eax, dword [eax]
push eax
lea ecx, [esp + 4]
mov dword [esp + 0x40], 0
mov dword [esp + 4], 0
call fcn.00401160
push 0
lea ecx, [esp + 4]
push ecx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x44], 1
call fcn.00402210
lea ecx, [esp]
mov byte [esp + 0x3c], 3
call fcn.004010f0
lea edx, [esp + 4]
push edx
lea ecx, [esp + 0x18]
call fcn.00401af0
mov eax, dword [esp + 4]
test eax, eax
je 0x4026f0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
call esi
push str.setup
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4026ef
test al, 0x10
je 0x4026ef
push str.setup
call esi
pop esi
lea ecx, [esp + 4]
call fcn.004010f0
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 0
call fcn.00401950
lea ecx, [esp + 8]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00401620
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
add esp, 0x40
ret
Function at 0x4028f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402905
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x402917
xor eax, eax
jmp 0x402949
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40293b
cmp esi, eax
jae 0x402913
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40292d
cmp esi, eax
jae 0x402913
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret

Function at 0x404969
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4177d0
call fcn.00406eb0
mov edi, 0x94
mov eax, edi
call fcn.00403cb0
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 [0x41fa10], ecx
mov eax, dword [esi + 4]
mov dword [0x41fa1c], eax
mov edx, dword [esi + 8]
mov dword [0x41fa20], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41fa14], esi
cmp ecx, 2
je 0x4049c9
or esi, 0x8000
mov dword [0x41fa14], esi
shl eax, 8
add eax, edx
mov dword [0x41fa18], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x404a04
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404a04
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x404a1c
cmp eax, 0x20b
je 0x404a09
mov dword [ebp - 0x1c], esi
jmp 0x404a30
cmp dword [ecx + 0x84], 0xe
jbe 0x404a04
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x404a2a
cmp dword [ecx + 0x74], 0xe
jbe 0x404a04
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040633c
pop ecx
test eax, eax
jne 0x404a44
push 0x1c
call fcn.00404945
pop ecx
call fcn.00407873
test eax, eax
jne 0x404a55
push 0x10
call fcn.00404945
pop ecx
call fcn.004096c8
mov dword [ebp - 4], esi
call fcn.004094ca
test eax, eax
jge 0x404a6e
push 0x1b
call fcn.00404920
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4212b0], eax
call fcn.004093a8
mov dword [0x41fa00], eax
call fcn.00409306
test eax, eax
jge 0x404a94
push 8
call fcn.00404920
pop ecx
call fcn.004090d3
test eax, eax
jge 0x404aa5
push 9
call fcn.00404920
pop ecx
call fcn.004053c7
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x404ab8
push eax
call fcn.00404920
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040906a
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x404ad9
movzx eax, word [ebp - 0x34]
jmp 0x404adc
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.0040d98e
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x404afa
push edi
call fcn.004054ff
call fcn.00405521
jmp 0x404b2c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00406eeb
ret
Function at 0x40ad9f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x41c7e0]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x40adc8
xor eax, eax
jmp 0x40af36
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x420f40]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40adfb
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0040c49f
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40aecd
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x40af08
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x40ae56
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40ae47
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x40ae2a
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ae96
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x40ae9f
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40ae1b
jmp 0x40aea1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x40af31
cmp dword [ebp - 8], edi
je 0x40af08
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x40aefa
call fcn.0040613a
mov dword [eax], 9
call fcn.00406143
mov dword [eax], esi
jmp 0x40af03
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40aeef
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x40aea1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x40aea1
push dword [ebp - 8]
call fcn.0040614c
pop ecx
or eax, 0xffffffff
jmp 0x40af34
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40af1d
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40af1d
xor eax, eax
jmp 0x40af34
call fcn.0040613a
mov dword [eax], 0x1c
call fcn.00406143
mov dword [eax], edi
jmp 0x40af03
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.00404eae
leave
ret
Function at 0x40b848
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00403cb0
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b8dd
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x41fa10]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x40b8dd
cmp eax, 1
je 0x40b8f5
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b8dd
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x40b8b2
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x40b8d9
xor eax, eax
inc eax
jmp 0x40b911
cmp esi, ebx
jae 0x40b8e1
xor eax, eax
jmp 0x40b911
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x41fa10]
jmp 0x40b8f7
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40c0c2
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41fe50], ebx
push esi
push edi
jne 0x40c142
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40c17d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41871c
push edi
call esi
test eax, eax
mov dword [0x41fe50], eax
je 0x40c17d
push 0x41870c
push edi
call esi
push 0x4186f8
push edi
mov dword [0x41fe54], eax
call esi
cmp dword [0x41fa10], 2
mov dword [0x41fe58], eax
jne 0x40c142
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41fe60], eax
je 0x40c142
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41fe5c], eax
mov eax, dword [0x41fe5c]
test eax, eax
je 0x40c187
call eax
test eax, eax
je 0x40c16e
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41fe60]
test eax, eax
je 0x40c16e
test byte [ebp - 8], 1
jne 0x40c187
cmp dword [0x41fa1c], 4
jb 0x40c181
or byte [ebp + 0x12], 0x20
jmp 0x40c1a6
xor eax, eax
jmp 0x40c1b6
or byte [ebp + 0x12], 4
jmp 0x40c1a6
mov eax, dword [0x41fe54]
test eax, eax
je 0x40c1a6
call eax
mov ebx, eax
test ebx, ebx
je 0x40c1a6
mov eax, dword [0x41fe58]
test eax, eax
je 0x40c1a6
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41fe50]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40cfb2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40d178
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x420f40]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40d178
test cl, 0x48
je 0x40d018
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40d018
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d06a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40d052
call fcn.0040613a
mov dword [eax], 9
call fcn.00406143
mov dword [eax], esi
jmp 0x40d062
cmp eax, 0x6d
je 0x40d178
push eax
call fcn.0040614c
pop ecx
or eax, 0xffffffff
jmp 0x40d17a
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x40d173
test edx, edx
je 0x40d08d
cmp byte [ebx], 0xa
jne 0x40d08d
or al, 4
jmp 0x40d08f
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40d16d
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40d15d
cmp al, 0xd
je 0x40d0c3
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40d14f
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40d0dd
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40d0d8
add dword [ebp + 0x10], 2
jmp 0x40d131
mov dword [ebp + 0x10], eax
jmp 0x40d14b
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
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 0x40d105
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40d14b
cmp dword [ebp - 0xc], 0
je 0x40d14b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40d126
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40d131
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40d14e
cmp ebx, dword [ebp + 0xc]
jne 0x40d136
cmp byte [ebp - 1], 0xa
jne 0x40d136
mov byte [ebx], 0xa
jmp 0x40d14e
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040ac80
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40d14f
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40d0a7
jmp 0x40d16d
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40d16d
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40d17a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4120f2
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x41c7e0]
xor eax, dword [ebp + 4]
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 0x412144
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, esi
jne 0x412144
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x412150
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
call fcn.00404eae
leave
ret 8

Function at 0x412be2
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x41c7e0]
xor eax, dword [ebp + 4]
push esi
mov esi, ecx
cmp dword [esi + 0x50], 0
mov dword [ebp - 4], eax
je 0x412c32
push dword [ebp + 8]
call fcn.00414283
mov esi, eax
test esi, esi
je 0x412c5a
push edi
push 4
lea eax, [ebp + 0x10]
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
pop edi
jmp 0x412c5a
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push 0x416c40
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [esi + 0x64]
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
call fcn.00404eae
leave
ret 0xc

Function at 0x412dc0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x41c7e0]
xor eax, dword [ebp + 4]
cmp dword [ebp + 0xc], 0x800
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
jne 0x412e1d
push 0x41673c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00404eae
leave
ret
push 4
push eax
push 3
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x412dec
jmp 0x412e10