joyce8/EMBER2024-capa huggingface dataset:
Function at 0x106b9b1
Capabilities:
Delete registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x1075fb8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor eax, eax
push 0x1fe
push eax
mov word [ebp - 0x204], ax
lea eax, [ebp - 0x202]
push eax
mov dword [ebp - 0x208], 1
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [0x1075004]
mov ebx, 0x1075004
cmp eax, ebx
je 0x106ba20
test byte [eax + 0x1c], 2
je 0x106ba20
cmp byte [eax + 0x19], 5
jb 0x106ba20
push 0x10064f8
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push 0x1006a08
push 0x10069f0
push 0x100
push eax
call fcn.01009acc
mov edi, eax
add esp, 0x14
test edi, edi
jge 0x106ba91
mov eax, dword [0x1075004]
cmp eax, ebx
je 0x106ba6f
test byte [eax + 0x1c], 2
je 0x106ba6f
cmp byte [eax + 0x19], 2
jb 0x106ba6f
push edi
push 0x10064f8
push 0x25
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
mov eax, edi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x106ba83
and edi, 0xffff
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x106bba9
push 0x20019
push 0
lea eax, [ebp - 0x204]
push eax
mov edi, reloc.OLEAUT32.dll_SysReAllocString
push edi
call fcn.010600a9
mov ebx, eax
test ebx, ebx
jne 0x106bb05
and dword [ebp - 0x208], eax
push 0x20019
push eax
push 0x1006a08
push edi
call fcn.010600a9
mov ebx, eax
test ebx, ebx
jne 0x106bb05
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x106ba8a
test byte [eax + 0x1c], 2
je 0x106ba8a
cmp byte [eax + 0x19], 2
jb 0x106ba8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1075004]
push 0x10064f8
push 0x26
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
jmp 0x106ba8a
push 0x1001768
call fcn.0105ccae
push 0x1001d60
push 0x100668c
push ebx
mov dword [esi + 8], eax
call fcn.01060a9d
push 0x1001d60
push 0x1006680
push ebx
mov dword [esi], eax
call fcn.01060a9d
push 0x10066b0
push ebx
mov dword [esi + 4], eax
call fcn.010601f3
push 0x10066bc
push ebx
mov dword [esi + 0xc], eax
call fcn.010601f3
push ebx
mov dword [esi + 0x10], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x208], 1
jne 0x106bba6
push 0
push 0
lea eax, [ebp - 0x204]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyExW]
test eax, eax
je 0x106bba6
mov ecx, dword [0x1075004]
cmp ecx, 0x1075004
je 0x106bba6
test byte [ecx + 0x1c], 2
je 0x106bba6
cmp byte [ecx + 0x19], 2
jb 0x106bba6
push eax
push 0x10064f8
push 0x27
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0102ca9d
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0105bb63
leave
ret 8
Function at 0x106c6f6
Capabilities:
Delete registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x1075fb8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, dword [0x1075004]
mov esi, 0x1075004
mov ebx, 0x10064f8
cmp eax, esi
je 0x106c73b
test byte [eax + 0x1c], 2
je 0x106c73b
cmp byte [eax + 0x19], 5
jb 0x106c73b
push ebx
push 0x65
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push dword [ebp + 8]
push 0x1006acc
push 0x104
push eax
call fcn.01009acc
mov edi, eax
add esp, 0x14
test edi, edi
jge 0x106c7a1
mov eax, dword [0x1075004]
cmp eax, esi
je 0x106c784
test byte [eax + 0x1c], 2
je 0x106c784
cmp byte [eax + 0x19], 2
jb 0x106c784
push edi
push ebx
push 0x66
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
mov eax, edi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x106c837
and edi, 0xffff
jmp 0x106c837
push 0x10000
push 0
push 0x1004dc8
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.010600a9
mov dword [ebp - 0x210], eax
test eax, eax
jne 0x106c7ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1075004]
cmp eax, esi
je 0x106c837
test byte [eax + 0x1c], 2
je 0x106c837
cmp byte [eax + 0x19], 2
jb 0x106c837
push edi
push ebx
push 0x67
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
jmp 0x106c837
push 0
push 0
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyExW]
mov edi, eax
test edi, edi
je 0x106c82b
mov eax, dword [0x1075004]
cmp eax, esi
je 0x106c82b
test byte [eax + 0x1c], 2
je 0x106c82b
cmp byte [eax + 0x19], 2
jb 0x106c82b
push edi
push ebx
push 0x68
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0105bb63
leave
ret 8

Function at 0x107457b
Capabilities:
Encode data using xor

Disassembly:
test edx, 0x9209e968
mov ecx, eax
sub ecx, 0xb1191237
inc edx
mov dh, 0x71
dec edx
sbb ch, ch
sub cl, dl
jmp 0x10744ec
xor cl, 7
inc edx
inc edx
nop
mov ecx, ecx
cmp ecx, 0x9c5cca0b
cmp ecx, esp
test ecx, ecx
sub eax, 2
mov dl, 0xd9
xchg edx, ecx
xchg edx, ecx
jmp 0x1074594
mov edx, 0x6dbbd929
adc word [eax + 0x1082800], 0xe4c9
sub ecx, 0xffffffea
dec cl
not dh
or ecx, 9
xchg dl, dl
not dl
cmp ecx, eax
not cl
inc edx
dec ecx
mov ch, 0xcf
jmp 0x10744ce
push 0x6a1e
clc
pop eax
xchg dl, ch
cld
lea edx, [edx - 0x47]
lea ecx, [edx - 0x563da20f]
jmp 0x1074534
not ecx
jge 0x1074534
not eax
add al, 0
stc
jmp fcn.0108902f
Function at 0x1001827b
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x1a0
push ebp
mov ebp, dword [esp + 0x1a8]
mov eax, dword [ebp + 0x48]
lea eax, [eax + ebp + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 0x18], eax
test byte [ebp + 0x24], 8
jne 0x10018438
mov eax, dword [ebp + 0x3c]
mov dword [esp + 0xc], 0
lea ecx, [eax + 1]
test ecx, ecx
jbe 0x10018430
push ebx
push esi
push edi
cmp dword [esp + 0x18], eax
jne 0x100182ca
mov edx, dword [ebp + 0x40]
mov dword [esp + 0x10], edx
jmp 0x100182d1
mov eax, dword [ebp + 0x44]
mov dword [esp + 0x10], eax
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x38]
and edi, 0x40d7b0
xor ecx, ecx
not edi
xor edi, eax
mov byte [esp + 0x1c], cl
xor eax, eax
mov byte [esp + eax + 0x30], al
inc eax
cmp eax, 0x100
jb 0x100182e9
xor esi, esi
mov eax, dword [esp + 0x1c]
xor edx, edx
and eax, 0xff
xor ebx, ebx
mov bl, byte [esp + esi + 0x30]
mov dl, byte [eax + ebp + 0x28]
add ecx, edx
add ebx, ecx
and ebx, 0x800000ff
jns 0x10018320
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x20], bl
mov dl, byte [esp + esi + 0x30]
mov ecx, dword [esp + 0x20]
and ecx, 0xff
inc eax
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + esi + 0x30], bl
mov byte [esp + ecx + 0x30], dl
xor edx, edx
div edi
inc esi
cmp esi, 0x100
mov byte [esp + 0x1c], dl
jb 0x100182f7
mov eax, dword [esp + 0x10]
xor esi, esi
test eax, eax
jbe 0x100183f3
xor eax, eax
xor ecx, ecx
inc eax
and eax, 0x800000ff
jns 0x10018371
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x28], al
xor edx, edx
mov eax, dword [esp + 0x28]
and eax, 0xff
mov dl, byte [esp + eax + 0x30]
add edx, ecx
and edx, 0x800000ff
jns 0x10018396
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x2c], dl
mov dl, byte [esp + eax + 0x30]
mov ecx, dword [esp + 0x2c]
and ecx, 0xff
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x30], bl
mov byte [esp + ecx + 0x30], dl
xor edx, edx
xor ebx, ebx
mov dl, byte [esp + eax + 0x30]
mov bl, byte [esp + ecx + 0x30]
add edx, ebx
and edx, 0x800000ff
jns 0x100183d2
dec edx
or edx, 0xffffff00
inc edx
mov edi, dword [esp + 0x14]
mov dl, byte [esp + edx + 0x30]
xor dl, byte [esi + edi]
mov byte [esp + esi + 0x130], dl
mov edx, dword [esp + 0x10]
inc esi
cmp esi, edx
jb 0x10018362
mov eax, edx
mov edx, dword [esp + 0x14]
mov ecx, eax
mov ebx, ecx
lea esi, [esp + 0x130]
mov edi, edx
add edx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov dword [esp + 0x14], edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x18]
inc ecx
lea edx, [eax + 1]
mov dword [esp + 0x18], ecx
cmp ecx, edx
jb 0x100182bb
pop edi
pop esi
pop ebx
mov eax, dword [ebp + 0x24]
or al, 8
mov dword [ebp + 0x24], eax
push ebp
call dword [esp + 0x1c]
pop ebp
add esp, 0x1a0
ret 4
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

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

Disassembly:
pushal
nop
nop
nop
mov eax, section..00cfg
mov ebx, 0x408ecc
nop
nop
mov ecx, 0x5a2c000a
nop
nop
nop
nop
test eax, eax
je 0x43004e
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x430024
nop
nop
mov eax, section..data
nop
nop
mov ebx, 0x42e1d0
nop
mov ecx, 0x326a0c78
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x430084
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x40607a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4060b9
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4060b9
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4060b9
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4060b9
cmp dword [ecx + 0x74], 0xe
jbe 0x4060b9
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x408b40
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsAlloc
push 0x443ca0
push str.FlsAlloc
push 0x1f
call fcn.00408812
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408b74
push dword [ebp + 8]
mov ecx, esi
call dword [section..00cfg]
call esi
jmp 0x408b7a
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x408bbe
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsGetValue
push 0x443cc4
push str.FlsGetValue
push 0x21
call fcn.00408812
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408bf5
push dword [ebp + 8]
mov ecx, esi
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x408bfd
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push str.FlsSetValue
push 0x443cd8
push str.FlsSetValue
push 0x22
call fcn.00408812
mov esi, eax
add esp, 0x10
test esi, esi
je 0x408c37
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40b0a3
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x44e04c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x40b0ee
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0040b2ff
test al, al
jne 0x40b0e8
sub edx, 2
cmp edx, edi
jne 0x40b0ce
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x40b110
lea eax, [edi + 2]
cmp edx, eax
je 0x40b110
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0040ad6a
add esp, 0x10
jmp 0x40b20a
push esi
lea ecx, [ebp - 0x255]
call fcn.0040b2ff
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40b153
push dword [ebp - 0x25c]
jmp 0x40b100
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x40b190
cmp word [ebp - 0x226], 0
je 0x40b1b1
cmp word [ebp - 0x226], ax
jne 0x40b190
cmp word [ebp - 0x224], 0
je 0x40b1b1
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0040ad6a
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x40b1fd
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x40b16a
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x40b1e5
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40b20a
push 0x40a7ba
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00412750
add esp, 0x10
jmp 0x40b1da
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402b3f
leave
ret

Function at 0x40df0d
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004073ee
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40df7c
cmp esi, dword [ebp - 4]
je 0x40df77
cmp dword [ebp + 0xc], 0
je 0x40df77
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40df54
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0040da5f
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x40df7e
xor eax, eax
inc eax
jmp 0x40df7e
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x40dfe3
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x44e04c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.004073ee
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004073ee
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x40e05a
cmp word [ecx], dx
je 0x40e05a
mov eax, dword [0x444fac]
push edi
dec eax
push eax
push 0x444e98
call fcn.0040df82
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x40e0cd
cmp word [eax], dx
je 0x40e0cd
mov eax, dword [edi]
test eax, eax
je 0x40e07e
cmp word [eax], dx
je 0x40e07e
lea eax, [ebp - 0x10]
push eax
call fcn.0040d965
jmp 0x40e087
lea eax, [ebp - 0x10]
push eax
call fcn.0040da00
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x40e0f7
mov eax, dword [0x444e94]
push dword [ebp - 0x14]
dec eax
push eax
push 0x444b88
call fcn.0040df82
add esp, 0xc
test al, al
je 0x40e0f7
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x40e0c2
cmp word [eax], di
je 0x40e0c2
lea eax, [ebp - 0x10]
push eax
call fcn.0040d965
pop ecx
jmp 0x40e0f9
lea eax, [ebp - 0x10]
push eax
call fcn.0040da00
jmp 0x40e0bf
mov eax, dword [edi]
test eax, eax
je 0x40e0e4
cmp word [eax], dx
je 0x40e0e4
lea eax, [ebp - 0x10]
push eax
call fcn.0040d8fc
pop ecx
jmp 0x40e0f7
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x40e1c2
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0040de07
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40e1c2
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x40e1c2
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x40e1c2
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40e14f
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00408d3d
test ebx, ebx
je 0x40e1bd
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00408d3d
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40e1c2
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40e1c2
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.00414a6a
add esp, 0x10
xor eax, eax
inc eax
jmp 0x40e1c4
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402b3f
leave
ret
Function at 0x40ee4f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x40eeec
push ebx
push esi
call fcn.0040ee0b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040f081
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40ee99
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40eeeb
push edi
push eax
call fcn.00407bfe
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40eeb9
call fcn.00406c33
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40eeea
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040f081
add esp, 0x20
test eax, eax
jne 0x40eed8
push edi
call fcn.00406c33
jmp 0x40eee0
push ebx
call fcn.00406c33
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x40eeef
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x40ef00
pop esi
ret
push ebx
push edi
push esi
call fcn.0040ee0b
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00407bfe
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x40ef28
push ebx
push esi
push edi
call fcn.0041b7f0
add esp, 0xc
push 0
call fcn.00406c33
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x40f856
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040f34d
Function at 0x41690f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x450350]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41694f
cmp byte [ebx], 0xa
jne 0x41694f
or byte [edi + eax + 0x28], 4
jmp 0x416954
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x416a53
mov dl, byte [eax]
cmp dl, 0x1a
je 0x416a36
inc eax
cmp dl, 0xd
je 0x416980
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4169a6
cmp eax, ecx
jae 0x4169b4
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x416968
jmp 0x416a53
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x416a31
cmp dword [ebp - 0x10], 0
je 0x416a31
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x450350]
test byte [eax + edi + 0x28], 0x48
je 0x416a0b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4169f6
mov byte [esi], dl
jmp 0x416a07
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x450350]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x416a53
cmp byte [ebp - 1], 0xa
jne 0x416a1a
cmp esi, ebx
jne 0x416a1a
mov byte [esi], 0xa
jmp 0x416a52
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041797b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x416a53
mov byte [esi], 0xd
jmp 0x416a52
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x450350]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x416a50
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x416a53
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret