joyce8/EMBER2024-capa huggingface dataset:
Function at 0x58192010
Capabilities:
Set current directory

Disassembly:
push ebx
mov ebx, dword [esp + 8]
cmp ebx, 1
jl 0x58192075
cmp ebx, 0x1f
jg 0x58192075
push 0xc
call fcn.58193480
add esp, 4
lea eax, [esp + 8]
add bl, 0x40
mov byte [esp + 9], 0x3a
push eax
mov byte [esp + 0xc], bl
mov byte [esp + 0xe], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x58192057
push 0xc
call fcn.58193500
add esp, 4
xor eax, eax
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.58191da0
add esp, 4
push 0xc
call fcn.58193500
add esp, 4
or eax, 0xffffffff
pop ebx
ret
call fcn.58191e20
mov dword [eax], 0xd
call fcn.58191e30
mov dword [eax], 0xf
or eax, 0xffffffff
pop ebx
ret

Function at 0x581922c0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.58192380
mov eax, dword [0x581b3548]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x581922e4
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 [0x581b3544], 1
mov byte [0x581b3540], bl
jne 0x5819233e
mov ecx, dword [0x581b5ce0]
test ecx, ecx
je 0x5819232c
mov esi, dword [0x581b5cdc]
sub esi, 4
cmp esi, ecx
jb 0x5819232c
mov eax, dword [esi]
test eax, eax
je 0x58192325
call eax
mov ecx, dword [0x581b5ce0]
sub esi, 4
cmp esi, ecx
jae 0x58192317
push 0x581a9028
push 0x581a9020
call fcn.581923a0
add esp, 8
push 0x581a9034
push 0x581a902c
call fcn.581923a0
add esp, 8
test ebx, ebx
je 0x5819235d
call fcn.58192390
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x581b3548], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x581932d0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x581b3554], 2
je 0x581932de
call fcn.58198340
mov eax, dword [esp + 4]
push eax
call fcn.58198380
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

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

Disassembly:
push esi
call fcn.581933d0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x581ab290], eax
je 0x58194bc8
push 0x74
push 1
call fcn.5819a390
mov esi, eax
add esp, 8
test esi, esi
je 0x58194bc8
mov eax, dword [0x581ab290]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x58194bc8
push esi
call fcn.58194c00
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 0x58194c20
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 [0x581ab290]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x58194c8e
push 0x74
push 1
call fcn.5819a390
mov esi, eax
add esp, 8
test esi, esi
je 0x58194c84
mov ecx, dword [0x581ab290]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x58194c84
push esi
call fcn.58194c00
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.581932a0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

Function at 0x58195500
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x58195575
push ebx
call fcn.58195630
add esp, 4
test eax, eax
jne 0x58195543
call fcn.58191e30
mov dword [eax], 0xf
call fcn.58191e20
mov dword [eax], 0xd
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x58195585
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x5819561f
inc eax
cmp eax, 0x104
ja 0x5819561f
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x581955d7
cmp eax, ecx
jg 0x581955b1
mov eax, ecx
push eax
call fcn.58193300
mov edx, eax
add esp, 4
test edx, edx
jne 0x581955f2
call fcn.58191e20
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x581955f2
call fcn.58191e20
mov dword [eax], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x58195630
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x5819563e
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x5819566d
cmp eax, 1
je 0x5819566d
mov eax, 1
ret
xor eax, eax
ret
Function at 0x58195f50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x58195f73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.58191da0
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x58195f98
test byte [esp + 8], 2
je 0x58195f98
call fcn.58191e20
mov dword [eax], 0xd
call fcn.58191e30
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x58197e90
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x581b3928]
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 0x58197ed2
call edi
mov esi, eax
test esi, esi
je 0x58197ebc
mov eax, 1
jmp 0x58197ecd
call ebp
mov ebx, eax
test ebx, ebx
je 0x58197fdf
mov eax, 2
mov dword [0x581b3928], eax
cmp eax, 1
jne 0x58197f72
test esi, esi
jne 0x58197eeb
call edi
mov esi, eax
test esi, esi
je 0x58197fdf
cmp word [esi], 0
mov eax, esi
je 0x58197f05
add eax, 2
cmp word [eax], 0
jne 0x58197ef3
add eax, 2
cmp word [eax], 0
jne 0x58197ef3
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 0x58197f64
push edi
call fcn.58193300
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x58197f64
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 0x58197f56
push ebx
call fcn.58195670
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 0x58197fdf
test ebx, ebx
jne 0x58197f83
call ebp
mov ebx, eax
test ebx, ebx
je 0x58197fdf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x58197f9b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x58197f8b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x58197f8b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.58193300
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x58197fbd
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 0x58198380
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x581ad4a0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x581983a4
add eax, 8
inc ebp
cmp eax, 0x581ad530
jb 0x58198395
cmp ecx, dword [ebp*8 + 0x581ad4a0]
jne 0x5819854b
mov eax, dword [0x581b3554]
cmp eax, 1
je 0x5819850d
test eax, eax
jne 0x581983d0
cmp dword [0x581ab06c], 1
je 0x5819850d
cmp ecx, 0xfc
je 0x5819854b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x5819840b
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 0x58198454
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 0x581a5280
add ebx, ecx
push ebx
call fcn.581995e0
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, 0x581a5260
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 + 0x581ad4a4]
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.5819b7c0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x581b5bc0]
test eax, eax
je 0x5819851e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x58198528
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x581ad4a4]
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 0x5819d930
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x5819daee
push 0x3d
push edi
call fcn.5819eaf0
mov esi, eax
add esp, 8
test esi, esi
je 0x5819daee
cmp edi, esi
je 0x5819daee
mov dl, byte [esi + 1]
mov ecx, dword [0x581b352c]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x581b3528]
cmp eax, ecx
jne 0x5819d987
push eax
call fcn.5819dbc0
add esp, 4
mov dword [0x581b3528], eax
test eax, eax
jne 0x5819da02
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5819d9ae
mov eax, dword [0x581b3530]
test eax, eax
je 0x5819d9ae
call fcn.5819b010
test eax, eax
je 0x5819d9fd
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x5819d9ba
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.58193300
add esp, 4
mov dword [0x581b3528], eax
test eax, eax
je 0x5819daee
mov dword [eax], 0
mov eax, dword [0x581b3530]
test eax, eax
jne 0x5819d9fd
push 4
call fcn.58193300
add esp, 4
mov dword [0x581b3530], eax
test eax, eax
je 0x5819daee
mov dword [eax], 0
mov eax, dword [0x581b3528]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.5819db40
mov esi, eax
add esp, 8
test esi, esi
jl 0x5819daff
cmp dword [ebx], 0
je 0x5819daff
test ebp, ebp
je 0x5819daf7
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.58195670
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x5819da59
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 0x5819da48
lea eax, [esi*4]
push eax
push ebx
call fcn.58192f50
add esp, 8
test eax, eax
je 0x5819da73
mov dword [0x581b3528], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5819dae6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.58193300
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5819dae6
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.58195670
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 0x5819da77
test ebp, ebp
jne 0x5819dae6
test esi, esi
jge 0x5819db09
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.58192f50
add esp, 8
test eax, eax
je 0x5819daee
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x581b3528], eax
jmp 0x5819da77
Function at 0x5819de00
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 0x5819de2c
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 + 0x581b5bc0]
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 0x5819de67
push 2
push ebp
push ecx
call fcn.5819f230
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x5819dfc9
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x5819df11
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x5819dec2
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x5819deaf
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 0x5819de92
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 0x5819dfba
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x5819df0d
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x5819de8e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x5819dfa9
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5819df65
cmp eax, 5
jne 0x5819df4e
call fcn.58191e20
mov dword [eax], 9
call fcn.58191e30
mov dword [eax], 5
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.58191da0
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 0x5819df85
cmp byte [ebp], 0x1a
jne 0x5819df85
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
call fcn.58191e20
mov dword [eax], 0x1c
call fcn.58191e30
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 0x5819df0d
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 0x5819dffa
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x5819df11
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x5819df11
Function at 0x5819e790
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x581b3a9c]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push edi
test eax, eax
jne 0x5819e7d8
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x5819e7b8
mov eax, 1
jmp 0x5819e7d3
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x5819e8a9
mov eax, 2
mov dword [0x581b3a9c], eax
cmp eax, 1
jne 0x5819e7f8
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, 2
jne 0x5819e8bb
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x5819e813
mov ecx, dword [0x581b35d0]
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_GetLocaleInfoA]
mov esi, eax
test esi, esi
jne 0x5819e832
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.58193300
mov edi, eax
add esp, 4
test edi, edi
jne 0x5819e846
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x5819e8a0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x5819e884
mov edx, dword [esp + 0x24]
push eax
push eax
push 0xffffffffffffffff
push edi
push 1
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
je 0x5819e8a0
push edi
call fcn.58195670
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
push eax
push 0xffffffffffffffff
push edi
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
jne 0x5819e8b0
push edi
call fcn.58195670
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call fcn.58195670
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x5819e8c0
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x581b3aa0]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x5819e908
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x5819e8ec
mov eax, 1
jmp 0x5819e903
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x5819e9e8
mov eax, 2
mov dword [0x581b3aa0], eax
cmp eax, 2
jne 0x5819e928
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 0x5819e9fa
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x5819e943
mov ecx, dword [0x581b35d0]
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 0x5819e962
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.58193300
mov esi, eax
add esp, 4
test esi, esi
jne 0x5819e979
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 0x5819e9df
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x5819e9c0
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 0x5819e9df
push esi
call fcn.58195670
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 0x5819e9ef
push esi
call fcn.58195670
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.58195670
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x5819f6d0
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10c
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x5819f750
lea ecx, [esp + 4]
push ecx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x5819f750
mov eax, dword [esp + 4]
cmp al, 0x5c
je 0x5819f705
cmp al, 0x2f
jne 0x5819f712
cmp al, ah
jne 0x5819f712
xor eax, eax
add esp, 0x10c
ret
and eax, 0xff
mov byte [esp], 0x3d
push eax
call fcn.5819f770
add esp, 4
mov byte [esp + 1], al
lea edx, [esp + 4]
lea eax, [esp]
push edx
push eax
mov byte [esp + 0xa], 0x3a
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x5819f750
xor eax, eax
add esp, 0x10c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.58191da0
add esp, 4
or eax, 0xffffffff
add esp, 0x10c
ret