joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49bd20
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.0049d570
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x4c72a4], eax
je 0x49bd78
push 0x74
push 1
call fcn.0049ad40
mov esi, eax
add esp, 8
test esi, esi
je 0x49bd78
mov eax, dword [0x4c72a4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x49bd78
push esi
call fcn.0049bd80
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 0x49bda0
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 [0x4c72a4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x49be0e
push 0x74
push 1
call fcn.0049ad40
mov esi, eax
add esp, 8
test esi, esi
je 0x49be04
mov ecx, dword [0x4c72a4]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x49be04
push esi
call fcn.0049bd80
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.00499a00
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

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

Disassembly:
mov eax, dword [0x4c72a4]
cmp eax, 0xffffffff
je 0x49becf
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x49be44
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x49bec0
mov eax, dword [esi + 0x24]
test eax, eax
je 0x49be54
push eax
call fcn.0049abf0
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x49be64
push eax
call fcn.0049abf0
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x49be74
push eax
call fcn.0049abf0
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x49be84
push eax
call fcn.0049abf0
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x49be94
push eax
call fcn.0049abf0
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x49bea4
push eax
call fcn.0049abf0
add esp, 4
mov eax, dword [esi + 0x50]
cmp eax, 0x4c74e8
je 0x49beb7
push eax
call fcn.0049abf0
add esp, 4
push esi
call fcn.0049abf0
add esp, 4
mov eax, dword [0x4c72a4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret
Function at 0x49eba0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x49ec15
push ebx
call fcn.0049ecd0
add esp, 4
test eax, eax
jne 0x49ebe3
call fcn.00499af0
mov dword [eax], 0xf
call fcn.00499ae0
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 0x49ec25
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x49ecbf
inc eax
cmp eax, 0x104
ja 0x49ecbf
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x49ec77
cmp eax, ecx
jg 0x49ec51
mov eax, ecx
push eax
call fcn.0049ab20
mov edx, eax
add esp, 4
test edx, edx
jne 0x49ec92
call fcn.00499ae0
mov dword [eax], 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x49ec92
call fcn.00499ae0
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 0x49ecd0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x49ecde
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 0x49ed0d
cmp eax, 1
je 0x49ed0d
mov eax, 1
ret
xor eax, eax
ret
Function at 0x49f330
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4cdba0]
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 0x49f372
call edi
mov esi, eax
test esi, esi
je 0x49f35c
mov eax, 1
jmp 0x49f36d
call ebp
mov ebx, eax
test ebx, ebx
je 0x49f47f
mov eax, 2
mov dword [0x4cdba0], eax
cmp eax, 1
jne 0x49f412
test esi, esi
jne 0x49f38b
call edi
mov esi, eax
test esi, esi
je 0x49f47f
cmp word [esi], 0
mov eax, esi
je 0x49f3a5
add eax, 2
cmp word [eax], 0
jne 0x49f393
add eax, 2
cmp word [eax], 0
jne 0x49f393
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 0x49f404
push edi
call fcn.0049ab20
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x49f404
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 0x49f3f6
push ebx
call fcn.0049abf0
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 0x49f47f
test ebx, ebx
jne 0x49f423
call ebp
mov ebx, eax
test ebx, ebx
je 0x49f47f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x49f43b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x49f42b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x49f42b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0049ab20
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x49f45d
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 0x49fa20
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x4c78a0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x49fa44
add eax, 8
inc ebp
cmp eax, 0x4c7930
jb 0x49fa35
cmp ecx, dword [ebp*8 + 0x4c78a0]
jne 0x49fbeb
mov eax, dword [0x4cd9ac]
cmp eax, 1
je 0x49fbad
test eax, eax
jne 0x49fa70
cmp dword [0x4c6e54], 1
je 0x49fbad
cmp ecx, 0xfc
je 0x49fbeb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x49faab
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 0x49faf4
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 0x4b9970
add ebx, ecx
push ebx
call fcn.004a52d0
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, 0x4b9950
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 + 0x4c78a4]
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.004a5450
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4cdf80]
test eax, eax
je 0x49fbbe
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x49fbc8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x4c78a4]
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 0x4a2ab0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004992d0
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push esi
push edi
xor ebp, ebp
push 1
push ebp
push ebx
call fcn.0049b500
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x4a2bf0
push 2
push ebp
push ebx
call fcn.0049b500
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a2bf0
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4a2b91
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.0049bcb0
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x4a2b36
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0049afc0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a2b52
sub esi, eax
test esi, esi
jle 0x4a2b6a
jmp 0x4a2b27
call fcn.00499af0
cmp dword [eax], 5
jne 0x4a2b67
call fcn.00499ae0
mov dword [eax], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.0049bcb0
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.0049b500
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x4a2bd7
push 0
push ecx
push ebx
call fcn.0049b500
add esp, 0xc
push ebx
call fcn.004a2920
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x4a2bd7
call fcn.00499ae0
mov dword [eax], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.00499af0
mov dword [eax], esi
push 0
push edi
push ebx
call fcn.0049b500
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x4a6840
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4a69fe
push 0x3d
push edi
call fcn.004a7a00
mov esi, eax
add esp, 8
test esi, esi
je 0x4a69fe
cmp edi, esi
je 0x4a69fe
mov dl, byte [esi + 1]
mov ecx, dword [0x4cd9d4]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x4cd9d0]
cmp eax, ecx
jne 0x4a6897
push eax
call fcn.004a6ad0
add esp, 4
mov dword [0x4cd9d0], eax
test eax, eax
jne 0x4a6912
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a68be
mov eax, dword [0x4cd9d8]
test eax, eax
je 0x4a68be
call fcn.004a11d0
test eax, eax
je 0x4a690d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4a68ca
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.0049ab20
add esp, 4
mov dword [0x4cd9d0], eax
test eax, eax
je 0x4a69fe
mov dword [eax], 0
mov eax, dword [0x4cd9d8]
test eax, eax
jne 0x4a690d
push 4
call fcn.0049ab20
add esp, 4
mov dword [0x4cd9d8], eax
test eax, eax
je 0x4a69fe
mov dword [eax], 0
mov eax, dword [0x4cd9d0]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.004a6a50
mov esi, eax
add esp, 8
test esi, esi
jl 0x4a6a0f
cmp dword [ebx], 0
je 0x4a6a0f
test ebp, ebp
je 0x4a6a07
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.0049abf0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x4a6969
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 0x4a6958
lea eax, [esi*4]
push eax
push ebx
call fcn.0049ed10
add esp, 8
test eax, eax
je 0x4a6983
mov dword [0x4cd9d0], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a69f6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.0049ab20
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4a69f6
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.0049abf0
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 0x4a6987
test ebp, ebp
jne 0x4a69f6
test esi, esi
jge 0x4a6a19
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0049ed10
add esp, 8
test eax, eax
je 0x4a69fe
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x4cd9d0], eax
jmp 0x4a6987
Function at 0x4a7c50
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x4cdf58]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x4a7c98
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4a7c7c
mov eax, 1
jmp 0x4a7c93
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x4a7d78
mov eax, 2
mov dword [0x4cdf58], eax
cmp eax, 2
jne 0x4a7cb8
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 0x4a7d8a
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4a7cd3
mov ecx, dword [0x4cda88]
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 0x4a7cf2
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.0049ab20
mov esi, eax
add esp, 4
test esi, esi
jne 0x4a7d09
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 0x4a7d6f
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x4a7d50
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 0x4a7d6f
push esi
call fcn.0049abf0
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 0x4a7d7f
push esi
call fcn.0049abf0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.0049abf0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4a80b0
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4a80c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4a80c9
xor eax, eax
test eax, eax
je 0x4a80da
push eax
call fcn.00499a60
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x402834
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x413014]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4028cc
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4028ac
xor eax, eax
push ebp
push 0x4028a5
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4028e8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4028ac
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x413014]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x413014], ax
mov esp, ebp
pop ebp
ret

Function at 0x4033a0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x41403c], 0
je 0x403401
cmp word [0x414210], 0xd7b2
jne 0x4033c9
cmp dword [0x414218], 0
jbe 0x4033c9
mov eax, 0x41420c
call dword [0x414228]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x41305c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403428
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x413020], 0
jne 0x40341d
push 0
push 0x413054
push 0x41305c
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404318
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x40437e
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00403688
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402728
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x404368
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404385
lea eax, [ebp - 0x10]
call fcn.0040351c
ret

Function at 0x405374
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
mov edi, edx
mov ebx, eax
test ebx, ebx
je 0x405410
test ebx, ebx
setl byte [esp]
mov eax, edi
mov edx, 0xb
call fcn.004039d0
mov esi, 0xb
mov eax, ebx
mov ecx, 0xa
cdq
idiv ecx
mov eax, edx
cdq
xor eax, edx
sub eax, edx
mov ebp, eax
mov eax, ebx
mov ecx, 0xa
cdq
idiv ecx
mov ebx, eax
mov eax, edi
call fcn.004038f8
lea edx, [ebp + 0x30]
mov byte [eax + esi - 1], dl
dec esi
test ebx, ebx
jne 0x40539c
cmp byte [esp], 0
je 0x4053e1
mov eax, edi
call fcn.004038f8
mov byte [eax + esi - 1], 0x2d
dec esi
test esi, esi
jle 0x40541c
mov eax, edi
call fcn.004038f8
push eax
mov eax, edi
call fcn.004038f8
add eax, esi
mov ebx, 0xb
sub ebx, esi
mov ecx, ebx
pop edx
call fcn.004025c4
mov edx, ebx
mov eax, edi
call fcn.004039d0
jmp 0x40541c
mov eax, edi
mov edx, 0x40542c
call fcn.00403570
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4059fc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403890
xor eax, eax
push ebp
push 0x405a5e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, ebx
mov edx, dword [ebp - 4]
call fcn.00403570
mov eax, ebx
call fcn.004038f0
mov eax, dword [ebx]
call fcn.004036a0
test eax, eax
jle 0x405a48
mov edx, 1
mov ecx, dword [ebx]
xor byte [ecx + edx - 1], 0x55
inc edx
dec eax
jne 0x405a3d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405a65
lea eax, [ebp - 4]
call fcn.0040351c
ret

Function at 0x405d04
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, eax
xor ebx, ebx
xor eax, eax
push ebp
push 0x405d4c
push dword fs:[eax]
mov dword fs:[eax], esp
push 2
mov edi, esi
push edi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x405d42
cmp word [edi], 0x5a4d
jne 0x405d42
lea eax, [esi + 0x3c]
mov ebx, dword [eax]
add ebx, esi
cmp dword [ebx], 0x4550
je 0x405d42
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x405d58
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x405e90
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffed4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00403890
xor eax, eax
push ebp
push 0x40606e
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
test ebx, ebx
je 0x40604d
mov eax, ebx
call fcn.00405d04
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x406038
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x78]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
add eax, ebx
mov edi, eax
test edi, edi
je 0x406038
mov eax, dword [edi + 0x18]
dec eax
test eax, eax
jl 0x406038
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x12c]
mov edx, dword [edi + 0x20]
add edx, ebx
mov ecx, dword [ebp - 0xc]
mov edx, dword [edx + ecx*4]
add edx, ebx
call fcn.0040364c
mov eax, dword [ebp - 0x12c]
mov edx, dword [ebp - 4]
call fcn.004037ec
jne 0x40602c
mov eax, dword [edi + 0x24]
add eax, ebx
mov edx, dword [ebp - 0xc]
mov si, word [eax + edx*2]
movzx eax, si
mov edx, dword [edi + 0x1c]
add edx, ebx
mov edi, dword [edx + eax*4]
mov eax, dword [ebp - 8]
cmp edi, dword [eax + 0x50]
jbe 0x40601f
xor edi, edi
push 0x104
lea eax, [ebp - 0x125]
push eax
push ebx
call sub.kernel32.dll_GetModuleFileNameA
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x125]
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x40601f
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CreateFileMappingA
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x406016
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40600d
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
call fcn.00405e3c
add eax, dword [ebp - 0x1c]
mov edi, eax
mov edx, dword [edi + 0x1c]
mov eax, dword [ebp - 8]
call fcn.00405e3c
add eax, dword [ebp - 0x1c]
movzx edx, si
mov edi, dword [eax + edx*4]
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push 0x104
lea eax, [ebp - 0x125]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, edi
mov eax, ebx
call fcn.00405d8c
mov esi, eax
jmp 0x406038
inc dword [ebp - 0xc]
dec dword [ebp - 0x20]
jne 0x405f0c
test esi, esi
jne 0x40604d
mov eax, dword [ebp - 4]
call fcn.004038a0
push eax
push ebx
call sub.kernel32.dll_GetProcAddress
mov esi, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406075
lea eax, [ebp - 0x12c]
call fcn.0040351c
lea eax, [ebp - 4]
call fcn.0040351c
ret