joyce8/EMBER2024-capa huggingface dataset:
Function at 0x77bf044e
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp._CKERNEL.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x77bf0473
call dword [sym.imp._CKERNEL.dll_GetLastError]
push eax
call fcn.77bef2d8
pop ecx
or eax, 0xffffffff
pop ebp
ret
test al, 1
je 0x77bf0495
test byte [ebp + 0xc], 2
je 0x77bf0495
call sym.msvcrt.dll__errno
mov dword [eax], 0xd
call sym.msvcrt.dll___doserrno
mov dword [eax], 5
jmp 0x77bf046e
xor eax, eax
pop ebp
ret

Function at 0x77bf0544
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call dword [sym.imp._CKERNEL.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x77bf0573
test byte [ebp + 0xc], 0x80
je 0x77bf0562
and eax, 0xfffffffe
jmp 0x77bf0565
or eax, 1
push eax
push dword [ebp + 8]
call dword [sym.imp._CKERNEL.dll_SetFileAttributesW]
test eax, eax
jne 0x77bf0585
call dword [sym.imp._CKERNEL.dll_GetLastError]
push eax
call fcn.77bef2d8
pop ecx
or eax, 0xffffffff
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x77bf0643
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x77c2fac4]
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
je 0x77bf06c9
push esi
call fcn.77bef63a
test eax, eax
pop ecx
jne 0x77bf0691
call sym.msvcrt.dll___doserrno
mov dword [eax], 0xf
call sym.msvcrt.dll__errno
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.77c27993
leave
ret
and word [ebp - 6], 0
lea eax, [ebp - 0x218]
push eax
add esi, 0x40
lea eax, [ebp - 0x214]
push eax
mov word [ebp - 0xc], si
mov esi, 0x104
push esi
lea eax, [ebp - 0xc]
push eax
mov word [ebp - 0xa], 0x3a
mov word [ebp - 8], 0x2e
call dword [sym.imp._CKERNEL.dll_GetFullPathNameW]
jmp 0x77bf06dc
lea eax, [ebp - 0x214]
push eax
mov esi, 0x104
push esi
call dword [sym.imp._CKERNEL.dll_GetCurrentDirectoryW]
test eax, eax
je 0x77bf0683
inc eax
cmp eax, esi
ja 0x77bf0683
test edi, edi
mov ecx, edi
jne 0x77bf0712
cmp eax, dword [ebp + 0x10]
jg 0x77bf06f3
mov eax, dword [ebp + 0x10]
add eax, eax
push eax
call sym.msvcrt.dll_malloc
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x77bf0727
call sym.msvcrt.dll__errno
mov dword [eax], 0xc
jmp 0x77bf0683
cmp eax, dword [ebp + 0x10]
jle 0x77bf0727
call sym.msvcrt.dll__errno
mov dword [eax], 0x22
jmp 0x77bf0683
lea eax, [ebp - 0x214]
push eax
push ecx
call sym.msvcrt.dll_wcscpy
pop ecx
pop ecx
jmp 0x77bf0685
Function at 0x77bfa166
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [sym.imp._CKERNEL.dll_GetEnvironmentVariableA]
push edi
xor ebx, ebx
push ebx
push ebx
mov edi, 0x77be1fe8
push edi
call esi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x77bfa2aa
push eax
push ebx
mov ebx, dword [sym.imp._CKERNEL.dll_GetProcessHeap]
call ebx
push eax
call dword [sym.imp._CKERNEL.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
je 0x77bfa2aa
push dword [ebp - 8]
push eax
push edi
call esi
test eax, eax
je 0x77bfa29c
mov edi, dword [ebp - 4]
cmp byte [edi], 0
mov ecx, edi
je 0x77bfa1d6
mov al, byte [ecx]
cmp al, 0x61
jl 0x77bfa1d0
cmp al, 0x7a
jg 0x77bfa1d0
sub al, 0x20
mov byte [ecx], al
inc ecx
cmp byte [ecx], 0
jne 0x77bfa1c2
push 0x16
push edi
push 0x77be1fd0
call sym.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
je 0x77bfa243
push 0x105
push 8
call ebx
push eax
call dword [sym.imp._CKERNEL.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x77bfa29c
push 3
push esi
push 0
call dword [sym.imp._CKERNEL.dll_GetModuleFileNameA]
cmp byte [esi], 0
mov ecx, esi
je 0x77bfa22a
mov al, byte [ecx]
cmp al, 0x61
jl 0x77bfa224
cmp al, 0x7a
jg 0x77bfa224
sub al, 0x20
mov byte [ecx], al
inc ecx
cmp byte [ecx], 0
jne 0x77bfa216
push esi
push dword [ebp - 4]
call sym.msvcrt.dll_strstr
pop ecx
pop ecx
push esi
push 0
mov edi, eax
call ebx
push eax
call dword [sym.imp._CKERNEL.dll_HeapFree]
test edi, edi
je 0x77bfa29c
push 0x2c
push edi
call sym.msvcrt.dll_strchr
test eax, eax
pop ecx
pop ecx
je 0x77bfa29c
inc eax
cmp byte [eax], 0x20
je 0x77bfa255
mov cl, byte [eax]
xor esi, esi
cmp cl, 0x30
jl 0x77bfa29c
cmp cl, 0x39
jg 0x77bfa27b
movsx ecx, cl
lea edx, [esi + esi*4]
inc eax
lea esi, [ecx + edx*2 - 0x30]
mov cl, byte [eax]
cmp cl, 0x30
jge 0x77bfa264
cmp esi, 2
je 0x77bfa28a
cmp esi, 3
je 0x77bfa28a
cmp esi, 1
jne 0x77bfa29c
push dword [ebp - 4]
push 0
call ebx
push eax
call dword [sym.imp._CKERNEL.dll_HeapFree]
mov eax, esi
jmp 0x77bfa2d4
push dword [ebp - 4]
push 0
call ebx
push eax
call dword [sym.imp._CKERNEL.dll_HeapFree]
cmp dword [sym.msvcrt.dll__osplatform], 2
jne 0x77bfa2c1
cmp dword [sym.msvcrt.dll__winmajor], 5
jb 0x77bfa2c1
xor eax, eax
inc eax
jmp 0x77bfa2d4
lea eax, [ebp - 8]
push eax
call fcn.77bfa12f
cmp byte [ebp - 8], 6
pop ecx
sbb eax, eax
add eax, 3
pop edi
pop esi
pop ebx
leave
ret
Function at 0x77bfc03f
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 4
pop eax
call fcn.77c0a600
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp._CKERNEL.dll_VirtualQuery]
test eax, eax
je 0x77bfc0a5
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp._CKERNEL.dll_GetSystemInfo]
mov eax, dword [sym.msvcrt.dll__osplatform]
mov esi, dword [ebp - 0x40]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
lea edx, [esi - 1]
and ecx, 0x103
not edx
and edx, ebx
inc ecx
sub edx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffff1
add eax, 0x11
imul eax, esi
add eax, edi
cmp edx, eax
jae 0x77bfc0a9
xor eax, eax
jmp 0x77bfc0b6
lea eax, [ebp - 4]
push eax
push ecx
push esi
push edx
call dword [sym.imp._CKERNEL.dll_VirtualProtect]
lea esp, [ebp - 0x50]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x77bfce5c
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
call fcn.77bfef34
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x77bfcfa3
push 2
push esi
push dword [ebp + 8]
call fcn.77bfef34
add esp, 0xc
cmp eax, ebx
je 0x77bfcfa3
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x77bfcf46
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp._CKERNEL.dll_GetProcessHeap]
push eax
call dword [sym.imp._CKERNEL.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x77bfced7
call sym.msvcrt.dll__errno
mov dword [eax], 0xc
or esi, 0xffffffff
jmp 0x77bfcf8e
push 0x8000
push dword [ebp + 8]
call fcn.77bffb53
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp edi, ebx
mov eax, ebx
jge 0x77bfcef1
mov eax, edi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.77c00109
add esp, 0xc
cmp eax, 0xffffffff
je 0x77bfcf0d
sub edi, eax
test edi, edi
jg 0x77bfcee9
jmp 0x77bfcf25
call sym.msvcrt.dll___doserrno
cmp dword [eax], 5
jne 0x77bfcf22
call sym.msvcrt.dll__errno
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.77bffb53
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp._CKERNEL.dll_GetProcessHeap]
push eax
call dword [sym.imp._CKERNEL.dll_HeapFree]
jmp 0x77bfcf8e
jge 0x77bfcf8e
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.77bfef34
push dword [ebp + 8]
call sym.msvcrt.dll__get_osfhandle
add esp, 0x10
push eax
call dword [sym.imp._CKERNEL.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x77bfcf8e
call sym.msvcrt.dll__errno
mov dword [eax], 0xd
call sym.msvcrt.dll___doserrno
mov edi, eax
call dword [sym.imp._CKERNEL.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.77bfef34
add esp, 0xc
mov eax, esi
pop edi
jmp 0x77bfcfa5
mov eax, ebx
pop esi
pop ebx
leave
ret
Function at 0x77bff64a
Capabilities:
Create pipe

Disassembly:
push 0x24
push 0x77be2528
call fcn.77c07420
mov ebx, dword [ebp + 8]
or esi, 0xffffffff
mov dword [ebx + 4], esi
mov dword [ebx], esi
mov dword [ebp - 0x34], 0xc
and dword [ebp - 0x30], 0
mov al, byte [ebp + 0x10]
and al, 0x80
neg al
sbb eax, eax
inc eax
mov dword [ebp - 0x2c], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp._CKERNEL.dll_CreatePipe]
test eax, eax
jne 0x77bff6a6
call dword [sym.imp._CKERNEL.dll_GetLastError]
push eax
call fcn.77bef2d8
pop ecx
mov eax, esi
jmp 0x77bff83e
call fcn.77bfe55d
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, esi
je 0x77bff802
and dword [ebp - 4], 0
mov ecx, edi
sar ecx, 5
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov byte [ecx + eax*4 + 4], 0x89
mov dword [ebp - 4], esi
call fcn.77bff7c4
call fcn.77bfe55d
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xffffffff
je 0x77bff7e2
mov dword [ebp - 4], 1
mov ecx, esi
sar ecx, 5
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov byte [ecx + eax*4 + 4], 0x89
or dword [ebp - 4], 0xffffffff
call fcn.77bff7d5
mov eax, 0x8000
test dword [ebp + 0x10], eax
jne 0x77bff72d
test byte [ebp + 0x11], 0x40
jne 0x77bff763
cmp dword [sym.msvcrt.dll__fmode], eax
jne 0x77bff763
mov ecx, edi
sar ecx, 5
mov eax, edi
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
lea eax, [ecx + eax*4 + 4]
and byte [eax], 0x7f
mov ecx, esi
sar ecx, 5
mov eax, esi
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
lea eax, [ecx + eax*4 + 4]
and byte [eax], 0x7f
test byte [ebp + 0x10], 0x80
je 0x77bff79f
mov ecx, edi
sar ecx, 5
mov eax, edi
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
lea eax, [ecx + eax*4 + 4]
or byte [eax], 0x10
mov ecx, esi
sar ecx, 5
mov eax, esi
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
lea eax, [ecx + eax*4 + 4]
or byte [eax], 0x10
push dword [ebp - 0x24]
push edi
call fcn.77bfe35a
push dword [ebp - 0x28]
push esi
call fcn.77bfe35a
add esp, 0x10
call sym.msvcrt.dll__errno
and dword [eax], 0
jmp 0x77bff810
mov ecx, edi
sar ecx, 5
mov eax, edi
and eax, 0x1f
lea eax, [eax + eax*8]
mov ecx, dword [ecx*4 + sym.msvcrt.dll___pioinfo]
mov byte [ecx + eax*4 + 4], 0
call sym.msvcrt.dll__errno
jmp 0x77bff80a
call sym.msvcrt.dll__errno
mov esi, dword [ebp - 0x20]
mov dword [eax], 0x18
call sym.msvcrt.dll__errno
cmp dword [eax], 0
je 0x77bff837
push dword [ebp - 0x24]
mov esi, dword [sym.imp._CKERNEL.dll_CloseHandle]
call esi
push dword [ebp - 0x28]
call esi
call sym.msvcrt.dll___doserrno
and dword [eax], 0
or eax, 0xffffffff
jmp 0x77bff83e
mov dword [ebx], edi
mov dword [ebx + 4], esi
xor eax, eax
call fcn.77c0745b
ret
Function at 0x77bff8bf
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
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 0x77bffa97
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + sym.msvcrt.dll___pioinfo]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x77bffa97
test cl, 0x48
je 0x77bff92c
cmp byte [eax + 5], 0xa
je 0x77bff92c
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
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._CKERNEL.dll_ReadFile]
test eax, eax
jne 0x77bff97e
call dword [sym.imp._CKERNEL.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x77bff966
call sym.msvcrt.dll__errno
mov dword [eax], 9
call sym.msvcrt.dll___doserrno
mov dword [eax], esi
jmp 0x77bff976
cmp eax, 0x6d
je 0x77bffa97
push eax
call fcn.77bef2d8
pop ecx
or eax, 0xffffffff
jmp 0x77bffa99
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x77bffa92
test eax, eax
je 0x77bff9a5
cmp byte [ebx], 0xa
jne 0x77bff9a5
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x77bff9ae
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
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 0x77bffa8c
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x77bffa7c
cmp al, 0xd
je 0x77bff9e0
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x77bffa6e
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x77bff9fa
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x77bff9f5
add dword [ebp + 0x10], 2
jmp 0x77bffa4e
mov dword [ebp + 0x10], eax
jmp 0x77bffa6a
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._CKERNEL.dll_ReadFile]
test eax, eax
jne 0x77bffa22
call dword [sym.imp._CKERNEL.dll_GetLastError]
test eax, eax
jne 0x77bffa6a
cmp dword [ebp - 0xc], 0
je 0x77bffa6a
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x77bffa43
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x77bffa4e
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x77bffa6d
cmp ebx, dword [ebp + 0xc]
jne 0x77bffa53
cmp byte [ebp - 1], 0xa
jne 0x77bffa53
mov byte [ebx], 0xa
jmp 0x77bffa6d
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.77bff060
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x77bffa6e
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x77bff9c4
jmp 0x77bffa8c
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x77bffa8c
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x77bffa99
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x77c00109
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x77c2fac4]
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x41c], ecx
jne 0x77c00140
xor eax, eax
jmp 0x77c002f3
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 + sym.msvcrt.dll___pioinfo]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x77c00175
push 2
push ecx
push ecx
push dword [ebp + 8]
call fcn.77bff060
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x77c00243
cmp dword [ebp + 0x10], ecx
mov dword [ebp - 0x414], edi
mov dword [ebp - 0x40c], ecx
jbe 0x77c002c1
jmp 0x77c0019c
xor ecx, ecx
mov dword [ebp - 0x410], ecx
mov ecx, dword [ebp - 0x414]
sub ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x408]
cmp ecx, dword [ebp + 0x10]
jae 0x77c001f2
mov edx, dword [ebp - 0x414]
inc dword [ebp - 0x414]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x77c001dd
inc dword [ebp - 0x41c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x410]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x410]
cmp dword [ebp - 0x410], 0x400
jl 0x77c001b4
mov edi, eax
lea eax, [ebp - 0x408]
sub edi, eax
push 0
lea eax, [ebp - 0x424]
push eax
push edi
lea eax, [ebp - 0x408]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp._CKERNEL.dll_WriteFile]
test eax, eax
je 0x77c00270
mov eax, dword [ebp - 0x424]
add dword [ebp - 0x418], eax
cmp eax, edi
jl 0x77c0027c
mov eax, dword [ebp - 0x414]
sub eax, dword [ebp - 0x420]
cmp eax, dword [ebp + 0x10]
jb 0x77c0019a
jmp 0x77c0027c
push ecx
lea ecx, [ebp - 0x424]
push ecx
push dword [ebp + 0x10]
push edi
push dword [eax]
call dword [sym.imp._CKERNEL.dll_WriteFile]
test eax, eax
je 0x77c00270
mov eax, dword [ebp - 0x424]
and dword [ebp - 0x40c], 0
mov dword [ebp - 0x418], eax
jmp 0x77c0027c
call dword [sym.imp._CKERNEL.dll_GetLastError]
mov dword [ebp - 0x40c], eax
mov eax, dword [ebp - 0x418]
test eax, eax
jne 0x77c002eb
cmp dword [ebp - 0x40c], eax
je 0x77c002bb
push 5
pop esi
cmp dword [ebp - 0x40c], esi
jne 0x77c002ad
call sym.msvcrt.dll__errno
mov dword [eax], 9
call sym.msvcrt.dll___doserrno
mov dword [eax], esi
jmp 0x77c002e6
push dword [ebp - 0x40c]
call fcn.77bef2d8
pop ecx
jmp 0x77c002e6
mov edi, dword [ebp - 0x420]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x77c002d3
cmp byte [edi], 0x1a
jne 0x77c002d3
xor eax, eax
jmp 0x77c002f1
call sym.msvcrt.dll__errno
mov dword [eax], 0x1c
call sym.msvcrt.dll___doserrno
and dword [eax], 0
or eax, 0xffffffff
jmp 0x77c002f1
sub eax, dword [ebp - 0x41c]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
call fcn.77c27993
leave
ret
Function at 0x77c043ae
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x77be27e8
call fcn.77c07420
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x77c31878], edi
jne 0x77c043f2
push edi
push edi
push ebx
push edi
call dword [sym.imp._CKERNEL.dll_GetLocaleInfoW]
test eax, eax
je 0x77c043dd
mov dword [0x77c31878], ebx
jmp 0x77c043f2
call dword [sym.imp._CKERNEL.dll_GetLastError]
cmp eax, 0x78
jne 0x77c043f2
mov dword [0x77c31878], 2
mov eax, dword [0x77c31878]
cmp eax, ebx
jne 0x77c04412
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp._CKERNEL.dll_GetLocaleInfoW]
jmp 0x77c044d5
cmp eax, 2
je 0x77c0441b
cmp eax, edi
jne 0x77c04443
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp + 0x18], edi
jne 0x77c0442e
mov eax, dword [sym.msvcrt.dll___lc_codepage]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp._CKERNEL.dll_GetLocaleInfoA]
mov dword [ebp - 0x20], eax
cmp eax, edi
jne 0x77c0444a
xor eax, eax
jmp 0x77c044d5
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.77c0a600
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x77c0447d
cmp esi, edi
jne 0x77c04493
push dword [ebp - 0x20]
call sym.msvcrt.dll_malloc
pop ecx
mov esi, eax
cmp esi, edi
je 0x77c04443
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x20]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp._CKERNEL.dll_GetLocaleInfoA]
test eax, eax
je 0x77c044c6
cmp dword [ebp + 0x14], edi
jne 0x77c044b0
push edi
push edi
jmp 0x77c044b6
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp._CKERNEL.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], edi
je 0x77c044d2
push esi
call sym.msvcrt.dll_free
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.77c0745b
ret

Function at 0x77c074ed
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x77c31944]
test eax, eax
push esi
mov esi, dword [sym.imp._CKERNEL.dll_GetCommandLineW]
jne 0x77c07531
call esi
test eax, eax
je 0x77c07516
mov dword [0x77c31944], 1
jmp 0x77c07536
call dword [sym.imp._CKERNEL.dll_GetLastError]
cmp eax, 0x78
jne 0x77c0752d
mov dword [0x77c31944], 2
jmp 0x77c0753f
xor eax, eax
jmp 0x77c07595
cmp eax, 1
jne 0x77c0753a
call esi
jmp 0x77c07595
cmp eax, 2
jne 0x77c0752d
push edi
call dword [sym.imp._CKERNEL.dll_GetCommandLineA]
mov esi, dword [sym.imp._CKERNEL.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push eax
push 1
push 0
mov dword [ebp - 8], eax
call esi
mov edi, eax
test edi, edi
je 0x77c07592
lea eax, [edi + edi]
push eax
call sym.msvcrt.dll_malloc
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x77c07592
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 1
push 0
call esi
test eax, eax
je 0x77c07589
mov eax, dword [ebp - 4]
jmp 0x77c07594
push dword [ebp - 4]
call sym.msvcrt.dll_free
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x77c0759d
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x77c31948]
push ebx
push esi
mov esi, dword [sym.imp._CKERNEL.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
xor edi, edi
cmp eax, ebx
jne 0x77c075e9
call esi
mov edi, eax
cmp edi, ebx
je 0x77c075cf
mov dword [0x77c31948], 1
jmp 0x77c075ee
call dword [sym.imp._CKERNEL.dll_GetLastError]
cmp eax, 0x78
jne 0x77c075e4
push 2
pop eax
mov dword [0x77c31948], eax
jmp 0x77c075e9
mov eax, dword [0x77c31948]
cmp eax, 1
jne 0x77c07666
cmp edi, ebx
jne 0x77c075fa
call esi
mov edi, eax
cmp edi, ebx
je 0x77c0766f
cmp word [edi], bx
mov eax, edi
je 0x77c0760f
inc eax
inc eax
cmp word [eax], bx
jne 0x77c07601
inc eax
inc eax
cmp word [eax], bx
jne 0x77c07601
mov esi, dword [sym.imp._CKERNEL.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
sub eax, edi
push ebx
sar eax, 1
inc eax
push eax
push edi
push ebx
push ebx
mov dword [ebp - 0xc], eax
call esi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x77c0765d
push eax
call sym.msvcrt.dll_malloc
cmp eax, ebx
pop ecx
mov dword [ebp - 4], eax
je 0x77c0765d
push ebx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push ebx
push ebx
call esi
test eax, eax
jne 0x77c0765a
push dword [ebp - 4]
call sym.msvcrt.dll_free
pop ecx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
push edi
call dword [sym.imp._CKERNEL.dll_FreeEnvironmentStringsW]
jmp 0x77c076be
cmp eax, 2
je 0x77c07673
cmp eax, ebx
je 0x77c07673
xor eax, eax
jmp 0x77c076c0
call dword [sym.imp._CKERNEL.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x77c0766f
cmp byte [esi], bl
je 0x77c07690
inc eax
cmp byte [eax], bl
jne 0x77c07686
inc eax
cmp byte [eax], bl
jne 0x77c07686
sub eax, esi
inc eax
mov edi, eax
push edi
call sym.msvcrt.dll_malloc
cmp eax, ebx
pop ecx
je 0x77c076b7
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
mov ebx, eax
push esi
call dword [sym.imp._CKERNEL.dll_FreeEnvironmentStringsA]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret