joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403a7d
Capabilities:
Allocate or change rwx memory
Read .ini file

Disassembly:
mov eax, 0x447c5b
call fcn.00447b68
sub esp, 0x178
push ebx
push esi
mov eax, 0xb2d3b
add dword [0x487314], eax
xor ebx, ebx
cmp dword [0x487314], 0x20a
jne 0x403b10
push edi
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push ebx
call dword [sym.imp.USER32.dll_ChildWindowFromPoint]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasW]
lea eax, [ebp - 0x184]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
push 0x402c08
push ebx
push 0x402c2c
push 0x402c54
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
call fcn.00403030
lea eax, [ebp - 0x3c]
call fcn.00403d4d
push ebx
mov dword [ebp - 4], ebx
call fcn.00404be2
push ebx
push ebx
push ebx
call fcn.004051dd
or dword [ebp - 4], 0xffffffff
add esp, 0x10
lea edi, [ebp - 0x3c]
call fcn.00403d72
pop edi
xor eax, eax
cmp eax, 0xf027935
jg 0x403b21
inc eax
cmp eax, 0x736251e2
jl 0x403b12
push 0x45ab08
mov byte [0x45ab0d], 0x6c
mov byte [0x45ab0f], 0x32
mov byte [0x45ab10], 0x2e
mov byte [0x45ab0b], 0x6e
mov byte [0x45ab0c], 0x65
mov byte [0x45ab11], 0x64
mov byte [0x45ab0e], 0x33
mov byte [0x45ab12], 0x6c
mov byte [0x45ab13], 0x6c
mov byte [0x45ab14], bl
mov byte [0x45ab08], 0x6b
mov byte [0x45ab09], 0x65
mov byte [0x45ab0a], 0x72
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push dword [0x487314]
mov dword [0x487284], eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea ecx, [ebp - 0x10]
push ecx
push 0x40
push dword [0x487314]
mov dword [0x487280], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x45503c]
xor esi, esi
mov dword [0x4873ec], eax
cmp dword [0x487314], ebx
jbe 0x403c12
mov eax, dword [0x4873ec]
mov dword [ebp - 0x14], eax
mov eax, 0xb2d3b
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + esi]
mov ecx, dword [0x487280]
mov byte [ecx + esi], al
cmp dword [0x487314], 0x44
jne 0x403c09
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalCompact]
push ebx
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
inc esi
cmp esi, dword [0x487314]
jb 0x403bc4
call fcn.004039c0
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetAtomNameA]
cmp esi, 0x770e
jne 0x403c36
call fcn.00403a57
inc esi
cmp esi, 0x286c535
jl 0x403c19
push 0x7b
pop esi
cmp dword [0x487314], 0xd
jne 0x403c77
push 0x30
lea eax, [ebp - 0x6c]
push ebx
push eax
mov dword [ebp - 0x70], ebx
call fcn.00405d80
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x70]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetDefaultCommConfigW]
push 0x402c98
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec esi
jne 0x403c42
call fcn.00403a71
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x4059bb
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x454168]
jne 0x4059c5
repz ret
jmp fcn.0040c76c
Function at 0x100034c0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push edi
push 0
push 0x20
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x10003529
push ebx
lea ecx, [esp + 0x10]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [ebx + 8]
push edx
call fcn.10003070
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esi + 8]
push ebx
push ecx
push edi
mov dword [esi], 1
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
ret

Function at 0x10003540
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x100035d2
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x100035c4
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x100035bc
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x10003585
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
Function at 0x401210
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x11c
mov ecx, dword [esp + 0x120]
mov eax, 0x64
push esi
mov dword [esp + 4], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
mov ax, word [esp + 0x128]
push ecx
lea edx, [esp + 0x5c]
xor esi, esi
push 0x42e128
push edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x3c], 0x105
mov word [esp + 0x40], ax
mov word [esp + 0x42], si
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
call fcn.004073b0
add esp, 0xc
lea eax, [esp + 0x48]
lea ecx, [esp + 4]
lea edx, [esp + 0x58]
push eax
push ecx
push esi
push esi
push 0x4000000
push 1
push esi
push esi
push edx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [esp + 0x48]
pop esi
neg eax
sbb eax, eax
and eax, ecx
add esp, 0x11c
ret 8

Function at 0x407420
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4297f8
push 0x40b9d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x43473c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x434738], ecx
shl ecx, 8
add ecx, edx
mov dword [0x434734], ecx
shr eax, 0x10
mov dword [0x434730], eax
call fcn.0040b990
test eax, eax
jne 0x40748a
push 0x1c
call fcn.004075d0
add esp, 4
call fcn.0040a1c0
test eax, eax
jne 0x40749d
push 0x10
call fcn.004075d0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b780
call fcn.00408500
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x435d2c], eax
call fcn.0040b620
mov dword [0x434720], eax
test eax, eax
je 0x4074d0
mov eax, dword [0x435d2c]
test eax, eax
jne 0x4074da
push 0xffffffffffffffff
call fcn.004076f0
add esp, 4
call fcn.0040b370
call fcn.0040b280
call fcn.004076c0
mov esi, dword [0x435d2c]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4075b9
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x407521
test al, al
je 0x407521
and eax, 0xff
push eax
call fcn.0040b220
add esp, 4
test eax, eax
je 0x4074fb
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4074fb
cmp byte [esi], 0x22
jne 0x40752a
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40753a
cmp al, 0x20
ja 0x40753a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40752a
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40755b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x407560
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.004076f0
jmp 0x40759e
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x40752a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4075b9
Function at 0x407730
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.004077f0
mov eax, dword [0x43476c]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x407754
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x434768], 1
mov byte [0x434764], bl
jne 0x4077ae
mov ecx, dword [0x435d28]
test ecx, ecx
je 0x40779c
mov esi, dword [0x435d24]
sub esi, 4
cmp esi, ecx
jb 0x40779c
mov eax, dword [esi]
test eax, eax
je 0x407795
call eax
mov ecx, dword [0x435d28]
sub esi, 4
cmp esi, ecx
jae 0x407787
push 0x42e098
push 0x42e090
call fcn.00407810
add esp, 8
push 0x42e0a4
push 0x42e09c
call fcn.00407810
add esp, 8
test ebx, ebx
je 0x4077cd
call fcn.00407800
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x43476c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40a1c0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.0040bcd0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x42f100], eax
je 0x40a218
push 0x74
push 1
call fcn.0040c670
mov esi, eax
add esp, 8
test esi, esi
je 0x40a218
mov eax, dword [0x42f100]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a218
push esi
call fcn.0040a220
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x40a240
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x42f100]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x40a2ae
push 0x74
push 1
call fcn.0040c670
mov esi, eax
add esp, 8
test esi, esi
je 0x40a2a4
mov ecx, dword [0x42f100]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40a2a4
push esi
call fcn.0040a220
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.004075d0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x40b620
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4349e8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x40b662
call edi
mov esi, eax
test esi, esi
je 0x40b64c
mov eax, 1
jmp 0x40b65d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b76f
mov eax, 2
mov dword [0x4349e8], eax
cmp eax, 1
jne 0x40b702
test esi, esi
jne 0x40b67b
call edi
mov esi, eax
test esi, esi
je 0x40b76f
cmp word [esi], 0
mov eax, esi
je 0x40b695
add eax, 2
cmp word [eax], 0
jne 0x40b683
add eax, 2
cmp word [eax], 0
jne 0x40b683
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x40b6f4
push edi
call fcn.004079b0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40b6f4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40b6e6
push ebx
call fcn.00407830
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40b76f
test ebx, ebx
jne 0x40b713
call ebp
mov ebx, eax
test ebx, ebx
je 0x40b76f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40b72b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b71b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40b71b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004079b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40b74d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40baf0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x42f1c0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40bb14
add eax, 8
inc ebp
cmp eax, 0x42f250
jb 0x40bb05
cmp ecx, dword [ebp*8 + 0x42f1c0]
jne 0x40bcbb
mov eax, dword [0x434728]
cmp eax, 1
je 0x40bc7d
test eax, eax
jne 0x40bb40
cmp dword [0x42ed7c], 1
je 0x40bc7d
cmp ecx, 0xfc
je 0x40bcbb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40bb7b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40bbc4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x429d40
add ebx, ecx
push ebx
call fcn.0040e7f0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x429d20
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x42f1c4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.0040e760
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x435c20]
test eax, eax
je 0x40bc8e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x40bc98
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x42f1c4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x40e2f0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x41c
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40e31c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x430]
mov eax, ecx
sar eax, 5
lea edi, [eax*4 + 0x435c20]
mov eax, ecx
and eax, 0x1f
mov dword [esp + 0x24], edi
mov edx, dword [edi]
lea esi, [eax + eax*8]
shl esi, 2
mov dword [esp + 0x14], esi
test byte [esi + edx + 4], 0x20
je 0x40e357
push 2
push ebp
push ecx
call fcn.0040e1f0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40e4b9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40e401
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40e3b2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40e39f
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40e382
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e4aa
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40e3fd
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40e37e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40e499
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40e455
cmp eax, 5
jne 0x40e43e
call fcn.004090f0
mov dword [eax], 9
call fcn.00409100
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00409070
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x40e475
cmp byte [ebp], 0x1a
jne 0x40e475
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.004090f0
mov dword [eax], 0x1c
call fcn.00409100
mov dword [eax], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40e3fd
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e4ea
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40e401
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40e401
Function at 0x411c60
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x434bd0]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x411ca8
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x411c88
mov eax, 2
jmp 0x411ca3
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x411d88
mov eax, 1
mov dword [0x434bd0], eax
cmp eax, 2
jne 0x411cc8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x411d9a
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x411ce3
mov ecx, dword [0x434a80]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x411d02
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.004079b0
mov esi, eax
add esp, 4
test esi, esi
jne 0x411d19
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x411d7f
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x411d60
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x411d7f
push esi
call fcn.00407830
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x411d8f
push esi
call fcn.00407830
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.00407830
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x412540
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4126fe
push 0x3d
push edi
call fcn.00407de0
mov esi, eax
add esp, 8
test esi, esi
je 0x4126fe
cmp edi, esi
je 0x4126fe
mov dl, byte [esi + 1]
mov ecx, dword [0x434750]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x43474c]
cmp eax, ecx
jne 0x412597
push eax
call fcn.004127d0
add esp, 4
mov dword [0x43474c], eax
test eax, eax
jne 0x412612
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4125be
mov eax, dword [0x434754]
test eax, eax
je 0x4125be
call fcn.00411900
test eax, eax
je 0x41260d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4125ca
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.004079b0
add esp, 4
mov dword [0x43474c], eax
test eax, eax
je 0x4126fe
mov dword [eax], 0
mov eax, dword [0x434754]
test eax, eax
jne 0x41260d
push 4
call fcn.004079b0
add esp, 4
mov dword [0x434754], eax
test eax, eax
je 0x4126fe
mov dword [eax], 0
mov eax, dword [0x43474c]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.00412750
mov esi, eax
add esp, 8
test esi, esi
jl 0x41270f
cmp dword [ebx], 0
je 0x41270f
test ebp, ebp
je 0x412707
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00407830
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x412669
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x412658
lea eax, [esi*4]
push eax
push ebx
call fcn.00408af0
add esp, 8
test eax, eax
je 0x412683
mov dword [0x43474c], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4126f6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.004079b0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4126f6
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.00407830
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x412687
test ebp, ebp
jne 0x4126f6
test esi, esi
jge 0x412719
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.00408af0
add esp, 8
test eax, eax
je 0x4126fe
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x43474c], eax
jmp 0x412687