joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10049600
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov ebp, dword [esi + 4]
cmp ebp, ebx
je 0x1004978b
cmp dword [esi + 0xc], ebx
je 0x1004978b
cmp dword [esi + 0x10], ebx
je 0x10049692
lea eax, [esp + 0x14]
lea edi, [esi + 0x1c]
push ebx
push eax
push edi
push ebp
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp eax, ebx
jne 0x10049677
mov ecx, dword [esi + 0x2c]
push 0x7530
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x10049666
mov dword [esi + 0x14], 0xf0000003
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 0xc
mov eax, dword [esi + 4]
lea edx, [esp + 0x14]
push ebx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
xor ecx, ecx
mov dword [esi + 0x10], ebx
mov dword [edi], ecx
cmp eax, ebx
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], ecx
je 0x1004978b
mov eax, dword [esi + 0xc]
xor edx, edx
mov dword [esp + 0x20], edx
push eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [esi + 0xc]
lea edx, [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x10]
push edx
mov edx, dword [esp + 0x38]
push eax
push ecx
push edx
push ebp
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
cmp edi, ebx
je 0x100496fc
cmp dword [esp + 0x10], ebx
jbe 0x100496fc
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, ebx
jne 0x10049718
cmp eax, ebx
je 0x10049718
cmp eax, 0x3e5
je 0x10049718
cmp eax, 0x217
jne 0x1004978b
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
cmp edi, ebx
je 0x10049750
push ebp
call dword [sym.imp.KERNEL32.dll_CancelIo]
cmp edi, 0x102
jne 0x1004978b
mov dword [esi + 0x14], 0xf0000003
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 0xc
lea eax, [esp + 0x18]
push ebx
lea ecx, [esp + 0x20]
push eax
push ecx
push ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edx, dword [esi + 0xc]
mov edi, eax
push edx
mov dword [esi + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [esp + 0x18]
mov eax, edi
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
and eax, ecx
pop ebx
add esp, 0x20
ret 0xc
mov dword [esi + 0x14], 0xf0000001
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 0xc
Function at 0x1004a930
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x101217a8
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
cmp ebp, 0x640
push edi
mov esi, ecx
ja 0x1004aa19
xor edi, edi
cmp ebp, edi
jbe 0x1004aa19
lea eax, [esi + 0x74]
push 1
push eax
lea ecx, [esp + 0x20]
call fcn.1003b350
mov eax, dword [esp + 0x34]
mov ebx, dword [esi + 0x64]
mov dword [esp + 0x2c], edi
lea ecx, [eax + eax*2]
shl ecx, 4
add ebx, ecx
cmp dword [ebx + 0x28], edi
jne 0x1004aa30
mov esi, dword [esp + 0x38]
mov edi, dword [ebx + 0x1c]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x24]
mov edx, dword [ebx + 0x1c]
lea ecx, [esp + 0x38]
push eax
mov eax, dword [ebx]
push ecx
push ebp
xor esi, esi
push edx
push eax
mov dword [ebx + 0x28], 1
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, esi
je 0x1004a9f7
cmp dword [esp + 0x38], ebp
jne 0x1004aabe
lea ecx, [esp + 0x18]
mov dword [ebx + 0x28], esi
mov dword [esp + 0x2c], 0xffffffff
call fcn.1003b3b0
mov eax, 1
jmp 0x1004aa1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x1004aabe
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call fcn.1003b3b0
xor eax, eax
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 0xc
push ebp
mov dword [esp + 0x18], edi
call fcn.10062117
mov edx, eax
add esp, 4
cmp edx, edi
mov dword [esp + 0x3c], edx
je 0x1004aa08
mov esi, dword [esp + 0x38]
mov ecx, ebp
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, dword [ebx + 0x2c]
mov eax, dword [ebx + 8]
mov esi, dword [ebx + 4]
test eax, eax
jne 0x1004aa7e
push 0x10
call fcn.10062117
add esp, 4
test eax, eax
jne 0x1004aa8c
mov edx, dword [esp + 0x3c]
jmp 0x1004aaa8
mov ecx, dword [eax]
mov dword [ebx + 8], ecx
mov ecx, dword [ebx + 0x10]
dec ecx
mov dword [ebx + 0x10], ecx
jmp 0x1004aa90
mov edx, dword [esp + 0x3c]
mov dword [eax + 4], esi
mov dword [eax], 0
mov ecx, dword [ebx + 0xc]
inc ecx
mov dword [ebx + 0xc], ecx
xor ecx, ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 8], ebp
mov dword [eax + 0xc], edx
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x1004aab9
mov dword [ecx], eax
jmp 0x1004aabb
mov dword [ebx], eax
mov dword [ebx + 4], eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call fcn.1003b3b0
mov eax, 1
jmp 0x1004aa1b
Function at 0x1004aae0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x101217c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
mov esi, ecx
push edi
push 1
lea eax, [esi + 0x74]
lea ecx, [esp + 0x10]
push eax
call fcn.1003b350
mov eax, dword [esp + 0x28]
xor edi, edi
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x64]
shl ecx, 4
add eax, ecx
mov edx, dword [eax + 0x20]
mov dword [edx], edi
mov ecx, dword [eax + 0x20]
mov dword [ecx + 4], edi
mov edx, dword [eax + 0x20]
mov dword [edx + 8], edi
mov ecx, dword [eax + 0x20]
mov dword [ecx + 0xc], edi
mov dword [esp + 8], edi
mov edx, dword [eax + 0x20]
lea ecx, [esp + 8]
push edx
mov edx, dword [eax + 0x18]
mov eax, dword [eax]
push ecx
push 0x640
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, edi
pop edi
pop esi
jne 0x1004ab92
cmp eax, 0x3e5
je 0x1004ab92
cmp eax, 0x218
je 0x1004ab92
lea ecx, [esp + 4]
mov dword [esp + 0x18], 0xffffffff
call fcn.1003b3b0
xor eax, eax
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 4
lea ecx, [esp + 4]
mov dword [esp + 0x18], 0xffffffff
call fcn.1003b3b0
mov ecx, dword [esp + 0x10]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x1c
ret 4

Function at 0x1004abc0
Capabilities:
Access peb ldr_data
Connect pipe
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x101217e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
lea eax, [ebx + 0x74]
push 1
push eax
lea ecx, [esp + 0x14]
call fcn.1003b350
mov eax, dword [esp + 0x38]
mov esi, dword [ebx + 0x64]
xor edi, edi
lea ecx, [eax + eax*2]
mov dword [esp + 0x30], edi
shl ecx, 4
add esi, ecx
mov edx, dword [esi + 0x20]
mov dword [edx + 8], edi
mov eax, dword [esi + 0x20]
mov dword [eax + 0xc], edi
mov ecx, dword [esi + 0x20]
mov dword [ecx], edi
mov edx, dword [esi + 0x20]
mov dword [edx + 4], edi
mov eax, dword [esi + 0x24]
mov dword [eax + 8], edi
mov ecx, dword [esi + 0x24]
mov dword [ecx + 0xc], edi
mov edx, dword [esi + 0x24]
mov dword [edx], edi
mov eax, dword [esi + 0x24]
mov dword [eax + 4], edi
mov ecx, dword [esi + 0x20]
mov edx, dword [esi]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x1004aca3
mov ecx, dword [esi + 0x20]
xor eax, eax
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x18]
mov dword [esp + 0x20], eax
push edx
mov dword [esp + 0x28], eax
mov eax, dword [esi]
mov dword [esp + 0x28], ecx
push eax
mov ecx, ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0x217
call fcn.1004a1b0
lea ecx, [esp + 0xc]
mov dword [esp + 0x30], 0xffffffff
call fcn.1003b3b0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
cmp eax, edi
je 0x1004acae
cmp eax, 0x3e5
jne 0x1004acb3
mov edi, 1
lea ecx, [esp + 0xc]
mov dword [esp + 0x30], 0xffffffff
call fcn.1003b3b0
mov ecx, dword [esp + 0x28]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret 4
Function at 0x1004c3b0
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x10121a55
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x91c
push esi
push edi
mov esi, dword [esp + 0x938]
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x126]
mov word [esp + 0x124], 0
mov dword [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [0x1016e824]
test esi, esi
je 0x1004c49c
test eax, eax
jne 0x1004c45b
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x14]
mov dword [0x1016e824], 1
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x20], 2
jne 0x1004c44f
cmp dword [esp + 0x14], 5
jb 0x1004c44f
mov ecx, dword [str.GlobalOCULAR_]
mov dword [0x1016e828], ecx
jmp 0x1004c45b
mov edx, dword [0x1014a6ac]
mov dword [0x1016e828], edx
mov eax, dword [esp + 0x93c]
test eax, eax
mov eax, dword [0x1014a6ac]
jne 0x1004c470
mov eax, dword [0x1016e828]
mov ecx, dword [esp + 0x944]
mov edx, dword [esp + 0x940]
push ecx
push edx
push esi
push eax
lea eax, [esp + 0x134]
push str._s__s__08x__08x
push eax
call fcn.100624ce
add esp, 0x18
jmp 0x1004c52b
test eax, eax
jne 0x1004c4f0
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x14]
mov dword [0x1016e824], 1
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x114
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x20], 2
jne 0x1004c4e6
cmp dword [esp + 0x14], 5
jb 0x1004c4e6
mov edx, dword [str.GlobalOCULAR_]
mov dword [0x1016e828], edx
jmp 0x1004c4f0
mov eax, dword [0x1014a6ac]
mov dword [0x1016e828], eax
mov eax, dword [esp + 0x93c]
test eax, eax
mov eax, dword [0x1014a6ac]
jne 0x1004c505
mov eax, dword [0x1016e828]
mov ecx, dword [esp + 0x944]
mov edx, dword [esp + 0x940]
push ecx
push edx
push eax
lea eax, [esp + 0x130]
push str._s___08x__08x
push eax
call fcn.100624ce
add esp, 0x14
lea ecx, [esp + 0x124]
push ecx
lea ecx, [esp + 0xc]
call fcn.1002c910
mov esi, dword [esp + 0x934]
lea edx, [esp + 8]
push edx
mov ecx, esi
mov dword [esp + 0x930], 1
call fcn.1002c6b0
mov dword [esp + 0xc], 1
lea ecx, [esp + 8]
mov byte [esp + 0x92c], 0
call fcn.1002d0b0
mov ecx, dword [esp + 0x924]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x928
ret
Function at 0x1004ecd0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 0xffffffff
je 0x1004ed58
mov eax, dword [esi + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x1004ed32
mov ecx, dword [esi + 0x18]
xor eax, eax
mov dword [esp + 9], eax
push edi
mov edi, dword [sym.imp.WS2_32.dll_htonl]
mov word [esp + 0x11], ax
push ecx
mov byte [esp + 0x10], bl
mov byte [esp + 0x17], al
call edi
push ebx
mov dword [esp + 0x10], eax
call edi
lea edx, [esp + 0xc]
push 8
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
push edx
push 0xd
push ebx
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
pop edi
jge 0x1004ed32
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0xc]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
pop esi
mov eax, 1
pop ebx
add esp, 8
ret
Function at 0x10051350
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push ebx
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x10051410
lea ecx, [esp + 0xc]
push 0x5c
push ecx
call fcn.1006243f
add esp, 8
test eax, eax
je 0x1005139f
mov word [eax], 0
mov edi, dword [esp + 0x218]
test edi, edi
je 0x10051409
mov ebx, dword [esp + 0x21c]
test ebx, ebx
je 0x10051409
lea edx, [esp + 0xc]
test edx, edx
je 0x10051409
mov eax, dword [esp + 0x220]
mov esi, 0x7a
test eax, eax
je 0x100513e6
push eax
lea eax, [esp + 0x10]
push eax
push 0x1013f804
push ebx
push edi
call fcn.1006261c
add esp, 0x14
xor esi, esi
jmp 0x10051418
lea ecx, [esp + 0xc]
push ecx
call fcn.10062422
add esp, 4
cmp ebx, eax
jbe 0x10051418
lea edx, [esp + 0xc]
push edx
push edi
call fcn.100624a9
add esp, 8
xor esi, esi
jmp 0x10051418
mov esi, 0x57
jmp 0x10051418
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x1016e8e4], esi
je 0x10051429
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x208
ret
Function at 0x10051630
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x10121fd5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x418
mov eax, dword [0x101267d4]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x21e]
mov word [esp + 0x21c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x16]
mov word [esp + 0x14], bx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push 0x104
push ecx
mov dword [esp + 0x434], 1
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x10051743
lea edx, [esp + 0x14]
push 0x5c
push edx
call fcn.1006243f
add esp, 8
cmp eax, ebx
je 0x100516c4
mov word [eax], bx
lea eax, [esp + 0x21c]
test eax, eax
je 0x1005173c
lea ecx, [esp + 0x14]
test ecx, ecx
je 0x1005173c
mov eax, dword [esp + 0x438]
mov esi, 0x7a
cmp eax, ebx
je 0x1005170d
lea edx, [esp + 0x14]
push eax
push edx
push 0x1013f804
lea eax, [esp + 0x228]
push 0x104
push eax
call fcn.1006261c
add esp, 0x14
xor esi, esi
mov eax, esi
jmp 0x10051749
lea ecx, [esp + 0x14]
push ecx
call fcn.10062422
add esp, 4
cmp eax, 0x104
jae 0x10051738
lea edx, [esp + 0x14]
lea eax, [esp + 0x21c]
push edx
push eax
call fcn.100624a9
add esp, 8
xor esi, esi
mov eax, esi
jmp 0x10051749
mov eax, 0x57
jmp 0x10051749
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [0x1016e8e4], eax
je 0x1005175b
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1005176c
lea ecx, [esp + 0x21c]
push ecx
lea ecx, [esp + 0x10]
call fcn.1002d330
mov esi, dword [esp + 0x434]
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.1002c6b0
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x42c], bl
call fcn.1002d0b0
mov ecx, dword [esp + 0x424]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x424
ret

Function at 0x10051870
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push ebx
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x10051914
mov edi, dword [esp + 0x218]
test edi, edi
je 0x1005190d
mov ebx, dword [esp + 0x21c]
test ebx, ebx
je 0x1005190d
lea ecx, [esp + 0xc]
test ecx, ecx
je 0x1005190d
mov eax, dword [esp + 0x220]
mov esi, 0x7a
test eax, eax
je 0x100518ea
lea edx, [esp + 0xc]
push eax
push edx
push 0x1013f804
push ebx
push edi
call fcn.1006261c
add esp, 0x14
xor esi, esi
jmp 0x1005191c
lea eax, [esp + 0xc]
push eax
call fcn.10062422
add esp, 4
cmp ebx, eax
jbe 0x1005191c
lea ecx, [esp + 0xc]
push ecx
push edi
call fcn.100624a9
add esp, 8
xor esi, esi
jmp 0x1005191c
mov esi, 0x57
jmp 0x1005191c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x1016e8e4], esi
je 0x1005192d
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x208
ret
Function at 0x10053880
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x41c
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
mov dword [esp + 0x14], 0x208
push eax
push 0x10142140
push reloc.WS2_32.dll_bind
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, ebp
jne 0x100538f9
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push ebp
push 0x10142120
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0xc]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebp
je 0x10053954
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x18]
push str.c:program_filescommom_files
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
call fcn.100624a9
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22a]
mov word [esp + 0x228], bp
rep stosd dword es:[edi], eax
add esp, 8
lea ecx, [esp + 0x220]
stosw word es:[edi], ax
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dx, word [esp + 0x220]
mov word [esp + 0x18], dx
jmp 0x10053979
lea eax, [esp + 0x18]
mov word [esp + 0x21e], bp
push eax
call fcn.10062422
add esp, 4
dec eax
cmp word [esp + eax*2 + 0x18], 0x5c
lea eax, [esp + eax*2 + 0x18]
jne 0x10053979
mov word [eax], bp
mov edi, dword [esp + 0x42c]
push ebx
cmp edi, ebp
je 0x100539e4
mov ebx, dword [esp + 0x434]
cmp ebx, ebp
je 0x100539e4
lea ecx, [esp + 0x1c]
test ecx, ecx
je 0x100539e4
mov eax, dword [esp + 0x438]
mov esi, 0x7a
cmp eax, ebp
je 0x100539c1
lea edx, [esp + 0x1c]
push eax
push edx
push 0x1013f804
push ebx
push edi
call fcn.1006261c
add esp, 0x14
xor esi, esi
jmp 0x100539e9
lea eax, [esp + 0x1c]
push eax
call fcn.10062422
add esp, 4
cmp ebx, eax
jbe 0x100539e9
lea ecx, [esp + 0x1c]
push ecx
push edi
call fcn.100624a9
add esp, 8
xor esi, esi
jmp 0x100539e9
mov esi, 0x57
cmp esi, ebp
mov dword [0x1016e8e4], esi
pop ebx
je 0x100539fb
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp esi, ebp
pop edi
pop esi
sete al
pop ebp
add esp, 0x41c
ret
Function at 0x100547b0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x420
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1e]
mov word [esp + 0x1c], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
lea ecx, [esp + 0xc]
push eax
push ecx
push ebp
push 0x20119
push ebp
push ebp
push ebp
push 0x10142140
push reloc.WS2_32.dll_bind
mov dword [esp + 0x34], 0x208
mov dword [esp + 0x38], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x3c], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebp
jne 0x1005483b
lea edx, [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
push 0x10142120
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebp
je 0x10054896
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x1c]
push str.c:program_filescommom_files
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
call fcn.100624a9
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22e]
mov word [esp + 0x22c], bp
rep stosd dword es:[edi], eax
add esp, 8
lea edx, [esp + 0x224]
stosw word es:[edi], ax
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ax, word [esp + 0x224]
mov word [esp + 0x1c], ax
jmp 0x100548bb
lea ecx, [esp + 0x1c]
mov word [esp + 0x222], bp
push ecx
call fcn.10062422
add esp, 4
dec eax
cmp word [esp + eax*2 + 0x1c], 0x5c
lea eax, [esp + eax*2 + 0x1c]
jne 0x100548bb
mov word [eax], bp
mov edi, dword [esp + 0x430]
push ebx
cmp edi, ebp
je 0x10054926
mov ebx, dword [esp + 0x438]
cmp ebx, ebp
je 0x10054926
lea edx, [esp + 0x20]
test edx, edx
je 0x10054926
mov eax, dword [esp + 0x43c]
mov esi, 0x7a
cmp eax, ebp
je 0x10054903
push eax
lea eax, [esp + 0x24]
push eax
push 0x1013f804
push ebx
push edi
call fcn.1006261c
add esp, 0x14
xor esi, esi
jmp 0x1005492b
lea ecx, [esp + 0x20]
push ecx
call fcn.10062422
add esp, 4
cmp ebx, eax
jbe 0x1005492b
lea edx, [esp + 0x20]
push edx
push edi
call fcn.100624a9
add esp, 8
xor esi, esi
jmp 0x1005492b
mov esi, 0x57
cmp esi, ebp
mov dword [0x1016e8e4], esi
pop ebx
je 0x1005493d
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp esi, ebp
pop edi
pop esi
sete al
pop ebp
add esp, 0x420
ret
Function at 0x10059520
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
test ebx, ebx
jne 0x1005953c
xor eax, eax
pop ebx
add esp, 0x208
ret
push ebp
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
push 0x207
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.10062b60
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.10062ca0
mov esi, eax
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x100595c0
cmp byte [esp + 0x10], 0x5c
jne 0x100595c0
cmp byte [esp + 0x11], 0x5c
jne 0x100595c0
lea edx, [esp + 0x12]
push 0x5c
push edx
call fcn.10062ca0
add esp, 8
test eax, eax
je 0x1005963e
inc eax
push 0x5c
push eax
call fcn.10062ca0
add esp, 8
mov esi, eax
test esi, esi
je 0x1005963e
lea eax, [esp + 0x10]
mov byte [esi], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x10059602
test bl, 1
je 0x100595f1
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 0xfffffffe
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x10059674
cmp ebx, 0xffffffff
je 0x1005960b
test edi, edi
jne 0x1005961a
lea ecx, [esp + 0x10]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x10059674
mov byte [esi], 0x5c
inc esi
push 0x5c
push esi
call fcn.10062ca0
mov esi, eax
add esp, 8
test esi, esi
jne 0x100595c4
test ebp, ebp
je 0x10059674
mov ebx, dword [esp + 0x21c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10059669
test al, 0x10
jne 0x10059674
test al, 1
je 0x1005965c
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x10059674
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x208
ret