joyce8/EMBER2024-capa huggingface dataset:
Function at 0x417cd0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
push esi
xor esi, esi
call fcn.00417c10
lea eax, [esp + 4]
push eax
push 0x20019
push esi
push str.CLSIDED834ED6_4B5A_4bfe_8F11_26DCA6B6A921InProcServer32
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x417d03
xor eax, eax
pop esi
add esp, 8
ret 4
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
mov dword [esp + 8], 0x104
push ecx
push edx
push 0
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x417d2f
mov esi, 1
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 8
ret 4

Function at 0x4ba6f1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4c33b0
cmp edx, dword [eax]
je 0x4ba713
add eax, 8
inc ecx
cmp eax, 0x4c3440
jl 0x4ba704
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4c33b0]
jne 0x4ba841
mov eax, dword [0x4c7d3c]
cmp eax, 1
je 0x4ba81b
test eax, eax
jne 0x4ba744
cmp dword [0x4c32dc], 1
je 0x4ba81b
cmp edx, 0xfc
je 0x4ba841
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4ba77b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004bb0d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004bb560
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4ba7be
lea eax, [ebp - 0x1a4]
push eax
call fcn.004bb560
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4bfa3c
push edi
call fcn.004bd430
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004bb0d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004bb0e0
lea eax, [ebp - 0xa0]
push 0x4bfa1c
push eax
call fcn.004bb0e0
push dword [esi + 0x4c33b4]
lea eax, [ebp - 0xa0]
push eax
call fcn.004bb0e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004bd3a4
add esp, 0x2c
pop edi
jmp 0x4ba841
lea eax, [ebp + 8]
lea esi, [esi + 0x4c33b4]
push 0
push eax
push dword [esi]
call fcn.004bb560
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x1020a890
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1020a946
push eax
mov dword fs:[0], esp
sub esp, 4
mov edx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x10], ecx
push esi
push edi
mov ebx, ecx
mov eax, dword [edx + 4]
mov dword [ebx + 4], eax
mov ecx, dword [edx + 8]
mov dword [ebx + 8], ecx
mov eax, dword [edx + 0xc]
mov dword [ebx + 0xc], eax
mov ecx, dword [edx + 0x10]
mov dword [ebx + 0x10], ecx
mov eax, dword [edx + 0x14]
mov dword [ebx + 0x14], eax
mov ecx, dword [edx + 0x18]
mov dword [ebx + 0x18], ecx
mov eax, dword [edx + 0x1c]
mov dword [ebx + 0x1c], eax
mov ecx, dword [edx + 0x20]
mov dword [ebx + 0x20], ecx
mov eax, dword [edx + 0x24]
mov dword [ebx + 0x24], eax
lea esi, [edx + 0x34]
mov ecx, dword [edx + 0x28]
lea edi, [ebx + 0x34]
mov dword [ebx + 0x28], ecx
mov eax, dword [edx + 0x2c]
mov dword [ebx + 0x2c], eax
mov ecx, dword [edx + 0x30]
mov dword [ebx + 0x30], ecx
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebx], vtable.streambuf.0
mov eax, dword [edx + 0x4c]
mov dword [ebx + 0x4c], eax
mov eax, ebx
mov ecx, dword [edx + 0x50]
pop edi
pop esi
mov dword [ebx + 0x50], ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebx], vtable.filebuf.0
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x1020cd40
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1020ce0e
push eax
mov dword fs:[0], esp
sub esp, 4
mov edx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x10], ecx
push esi
push edi
mov ebx, ecx
mov eax, dword [edx + 4]
mov dword [ebx + 4], eax
mov ecx, dword [edx + 8]
mov dword [ebx + 8], ecx
mov eax, dword [edx + 0xc]
mov dword [ebx + 0xc], eax
mov ecx, dword [edx + 0x10]
mov dword [ebx + 0x10], ecx
mov eax, dword [edx + 0x14]
mov dword [ebx + 0x14], eax
mov ecx, dword [edx + 0x18]
mov dword [ebx + 0x18], ecx
mov eax, dword [edx + 0x1c]
mov dword [ebx + 0x1c], eax
mov ecx, dword [edx + 0x20]
mov dword [ebx + 0x20], ecx
mov eax, dword [edx + 0x24]
mov dword [ebx + 0x24], eax
lea esi, [edx + 0x34]
mov ecx, dword [edx + 0x28]
lea edi, [ebx + 0x34]
mov dword [ebx + 0x28], ecx
mov eax, dword [edx + 0x2c]
mov dword [ebx + 0x2c], eax
mov ecx, dword [edx + 0x30]
mov dword [ebx + 0x30], ecx
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], 0
mov dword [ebx], vtable.streambuf.0
mov eax, dword [edx + 0x4c]
mov dword [ebx + 0x4c], eax
mov ecx, dword [edx + 0x50]
mov dword [ebx + 0x50], ecx
mov eax, dword [edx + 0x54]
mov dword [ebx + 0x54], eax
mov ecx, dword [edx + 0x58]
mov dword [ebp - 4], 0xffffffff
mov dword [ebx + 0x58], ecx
mov eax, dword [edx + 0x5c]
mov dword [ebx + 0x5c], eax
mov eax, ebx
mov edx, dword [edx + 0x60]
mov dword [ebx + 0x60], edx
mov dword [ebx], vtable.strstreambuf.0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1020d550
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1020d600
push eax
mov dword fs:[0], esp
sub esp, 4
mov edx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x10], ecx
push esi
push edi
mov ebx, ecx
mov eax, dword [edx + 4]
mov dword [ebx + 4], eax
mov ecx, dword [edx + 8]
mov dword [ebx + 8], ecx
mov eax, dword [edx + 0xc]
mov dword [ebx + 0xc], eax
mov ecx, dword [edx + 0x10]
mov dword [ebx + 0x10], ecx
mov eax, dword [edx + 0x14]
mov dword [ebx + 0x14], eax
mov ecx, dword [edx + 0x18]
mov dword [ebx + 0x18], ecx
mov eax, dword [edx + 0x1c]
mov dword [ebx + 0x1c], eax
mov ecx, dword [edx + 0x20]
mov dword [ebx + 0x20], ecx
mov eax, dword [edx + 0x24]
mov dword [ebx + 0x24], eax
lea esi, [edx + 0x34]
mov ecx, dword [edx + 0x28]
lea edi, [ebx + 0x34]
mov dword [ebx + 0x28], ecx
mov eax, dword [edx + 0x2c]
mov dword [ebx + 0x2c], eax
mov ecx, dword [edx + 0x30]
mov dword [ebx + 0x30], ecx
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword [ebx], vtable.streambuf.0
mov dword fs:[0], ecx
mov eax, dword [edx + 0x4c]
pop edi
mov dword [ebx + 0x4c], eax
mov eax, ebx
pop esi
mov dword [ebx], vtable.stdiobuf.0
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x102133d0
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
push edi
call fcn.10213490
cmp dword [0x1024a380], 1
mov esi, dword [esp + 0x10]
jne 0x102133f3
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x1024a37c], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x1024a378], bl
jne 0x1021344d
cmp dword [0x1024daec], 0
je 0x1021343b
mov edi, dword [0x1024dae8]
sub edi, 4
cmp edi, dword [0x1024daec]
jb 0x1021343b
mov eax, dword [edi]
test eax, eax
je 0x10213430
call eax
sub edi, 4
cmp edi, dword [0x1024daec]
jae 0x10213428
push 0x1024a054
push 0x1024a044
call sym.MSVCRT40.dll__initterm
add esp, 8
push 0x1024a05c
push 0x1024a058
call sym.MSVCRT40.dll__initterm
add esp, 8
test ebx, ebx
je 0x1021346c
call fcn.102134a0
pop edi
pop esi
pop ebx
ret
mov dword [0x1024a380], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x10213520
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x1024a388
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x10213547
add eax, 8
inc ecx
cmp eax, 0x1024a410
jb 0x10213538
cmp dword [ecx*8 + 0x1024a388], edx
lea ebx, [ecx*8]
jne 0x10213702
cmp dword [0x1024a42c], 1
je 0x102136c7
cmp dword [0x1024a42c], 0
jne 0x1021357e
cmp dword [0x1024a430], 1
je 0x102136c7
cmp edx, 0xfc
je 0x10213702
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x102135bb
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x102135ff
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x1023e628
push ebp
call sym.MSVCRT40.dll_strncpy
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1023edc0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x1024a38c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.10217fa0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x1024db00]
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x102136de
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x1024a38c]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub 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 ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x10214070
Capabilities:
Create thread
Resume thread

Disassembly:
push esi
push edi
xor edi, edi
push 0x74
push 1
call sym.MSVCRT40.dll_calloc
add esp, 8
mov esi, eax
cmp esi, edi
je 0x102140c3
push esi
call fcn.10214420
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], ecx
push esi
mov edx, dword [esp + 0x14]
push 4
push esi
push 0x10214100
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 4], eax
mov edi, eax
test edi, edi
jne 0x102140e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call sym.MSVCRT40.dll_free
add esp, 4
test edi, edi
je 0x102140d9
push edi
call fcn.102155c0
add esp, 4
mov eax, 0xffffffff
pop edi
pop esi
ret
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x102140bb
mov eax, edi
pop edi
pop esi
ret

Function at 0x10214210
Capabilities:
Create thread

Disassembly:
push esi
push edi
xor edi, edi
push 0x74
push 1
call sym.MSVCRT40.dll_calloc
add esp, 8
mov esi, eax
cmp esi, edi
je 0x10214270
push esi
call fcn.10214420
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
add esp, 4
mov dword [esi + 0x48], eax
push edx
mov eax, dword [esp + 0x20]
mov dword [esi + 0x4c], ecx
mov ecx, dword [esp + 0x14]
push eax
mov edx, dword [esp + 0x14]
push esi
mov dword [esi + 4], 0xffffffff
push 0x10214290
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x10214288
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call sym.MSVCRT40.dll_free
add esp, 4
test edi, edi
je 0x10214286
push edi
call fcn.102155c0
add esp, 4
xor eax, eax
pop edi
pop esi
ret

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

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x1024a4f8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x102144a3
push 0x74
push 1
call sym.MSVCRT40.dll_calloc
add esp, 8
mov edi, eax
test edi, edi
je 0x10214499
push edi
mov eax, dword [0x1024a4f8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x10214499
push edi
call fcn.10214420
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi], eax
mov dword [edi + 4], 0xffffffff
jmp 0x102144a3
push 0x10
call sym.MSVCRT40.dll__amsg_exit
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
ret
Function at 0x102144b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x1024a4f8], 0xffffffff
push esi
je 0x1021454f
mov esi, dword [esp + 8]
test esi, esi
jne 0x102144d8
mov eax, dword [0x1024a4f8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x10214541
mov eax, dword [esi + 0x24]
test eax, eax
je 0x102144e8
push eax
call sym.MSVCRT40.dll_free
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x102144f8
push eax
call sym.MSVCRT40.dll_free
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x10214508
push eax
call sym.MSVCRT40.dll_free
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10214518
push eax
call sym.MSVCRT40.dll_free
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10214528
push eax
call sym.MSVCRT40.dll_free
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x10214538
push eax
call sym.MSVCRT40.dll_free
add esp, 4
push esi
call sym.MSVCRT40.dll_free
add esp, 4
push 0
mov eax, dword [0x1024a4f8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
ret

Function at 0x102148f0
Capabilities:
Enumerate files on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x10214949
cmp dword [0x1024d768], 0
jne 0x10214914
push 0x244
call sym.MSVCRT40.dll_malloc
add esp, 4
mov dword [0x1024d768], eax
mov eax, dword [0x1024d76c]
test eax, eax
je 0x1021492e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [0x1024d76c], 0
mov eax, dword [0x1024d768]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [0x1024d76c], eax
cmp eax, 0xffffffff
jne 0x1021497a
xor eax, eax
pop esi
ret
mov eax, dword [0x1024d768]
mov ecx, dword [0x1024d76c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1021497a
mov eax, dword [0x1024d76c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop esi
mov dword [0x1024d76c], 0
ret
mov eax, dword [0x1024d768]
pop esi
add eax, 0x2c
ret

Function at 0x10214f40
Capabilities:
Enumerate files on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x10214f99
cmp dword [0x1024d984], 0
jne 0x10214f64
push 0x354
call sym.MSVCRT40.dll_malloc
add esp, 4
mov dword [0x1024d984], eax
mov eax, dword [0x1024d988]
test eax, eax
je 0x10214f7e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [0x1024d988], 0
mov eax, dword [0x1024d984]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [0x1024d988], eax
cmp eax, 0xffffffff
jne 0x10214fca
xor eax, eax
pop esi
ret
mov eax, dword [0x1024d984]
mov ecx, dword [0x1024d988]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10214fca
mov eax, dword [0x1024d988]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop esi
mov dword [0x1024d988], 0
ret
mov eax, dword [0x1024d984]
pop esi
add eax, 0x2c
ret
Function at 0x10215c00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
push ebp
xor edi, edi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], edi
cmp ebp, edi
jne 0x10215c28
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov edx, dword [esp + 0x42c]
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x1024db00
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ebx, dword [esp + 0x18]
shl eax, 2
lea ecx, [eax + eax*8]
mov eax, dword [ebx]
mov dword [esp + 0x1c], ecx
test byte [eax + ecx + 4], 0x20
je 0x10215c69
push 2
push 0
push edx
call fcn.10216130
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x10215d05
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x10215d3e
lea esi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x10215ccc
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x10215cba
mov byte [esi], 0xd
inc edi
inc esi
mov byte [esi], al
inc esi
mov eax, esi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x10215ca1
lea eax, [esp + 0x24]
push 0
sub esi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push esi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10215d34
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, esi
jge 0x10215c8c
jmp 0x10215d3e
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10215d34
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x10215d3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x10215dea
cmp dword [esp + 0x10], 0
je 0x10215d9a
cmp dword [esp + 0x10], 5
jne 0x10215d7d
call sym.MSVCRT40.dll__errno
mov dword [eax], 9
call sym.MSVCRT40.dll___doserrno
mov ecx, dword [esp + 0x10]
pop ebp
pop edi
mov dword [eax], ecx
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov ecx, dword [esp + 0x10]
push ecx
call fcn.102155c0
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x10215dc4
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x10215dc4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
call sym.MSVCRT40.dll__errno
mov dword [eax], 0x1c
call sym.MSVCRT40.dll___doserrno
pop ebp
mov dword [eax], 0
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, edi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x10216e10
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1008
call fcn.10213310
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1018]
push ebp
push 1
push ebx
push esi
call fcn.10216130
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x10216f32
push 2
push ebx
push esi
call fcn.10216130
add esp, 0xc
cmp eax, 0xffffffff
je 0x10216f32
mov ecx, dword [esp + 0x1020]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x10216ed3
lea edi, [esp + 0x18]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.102168f0
mov dword [esp + 0x1c], eax
add esp, 8
mov eax, 0x1000
cmp ebp, eax
jge 0x10216e8e
mov eax, ebp
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.10215c00
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x10216eac
sub ebp, edi
test ebp, ebp
jg 0x10216e83
jmp 0x10216ec3
call sym.MSVCRT40.dll___doserrno
cmp dword [eax], 5
jne 0x10216ec1
call sym.MSVCRT40.dll__errno
mov dword [eax], 0xd
mov ebx, edi
mov eax, dword [esp + 0x14]
push eax
push esi
call fcn.102168f0
add esp, 8
jmp 0x10216f15
jge 0x10216f15
push 0
push ecx
push esi
call fcn.10216130
add esp, 0xc
push esi
call sym.MSVCRT40.dll__get_osfhandle
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x10216f15
call sym.MSVCRT40.dll__errno
mov dword [eax], 0xd
call sym.MSVCRT40.dll___doserrno
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.10216130
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1008
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1008
ret
Function at 0x1021b540
Capabilities:
Get geographical location

Disassembly:
push ebx
mov eax, dword [0x1024b5e4]
push esi
test eax, eax
push edi
push ebp
jne 0x1021b588
push 0
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push 0
push 1
push 0
call esi
test eax, eax
je 0x1021b568
mov eax, 1
jmp 0x1021b58e
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x1021b581
mov eax, 2
jmp 0x1021b58e
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov dword [0x1024b5e4], eax
cmp eax, 1
jne 0x1021b5b3
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov ebx, dword [esp + 0x18]
push ecx
push edx
push ebx
call esi
pop ebp
pop edi
pop esi
pop ebx
ret
mov dword [0x1024b5e4], eax
cmp eax, 2
jne 0x1021b641
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x1021b5cf
mov edi, dword [0x1024ad48]
mov eax, dword [esp + 0x18]
push 0
mov ebx, dword [esp + 0x18]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov ebp, eax
test ebp, ebp
jne 0x1021b5f0
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
push ebp
call sym.MSVCRT40.dll_malloc
add esp, 4
mov esi, eax
test esi, esi
jne 0x1021b606
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, dword [esp + 0x18]
push ebp
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x1021b636
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x1021b646
push 0
push 0
push 0xffffffffffffffff
push esi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jne 0x1021b65e
push esi
call sym.MSVCRT40.dll_free
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
push eax
mov eax, dword [esp + 0x20]
push eax
push 0xffffffffffffffff
push esi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
je 0x1021b636
push esi
call sym.MSVCRT40.dll_free
add esp, 4
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret