joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407040
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push edi
push 0x124
xor edi, edi
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.00426310
add esp, 0xc
lea ecx, [ebp - 0x134]
push ecx
push esi
mov dword [ebp - 0x134], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4070c3
mov ebx, dword [sym.imp.KERNEL32.dll_Process32Next]
mov edi, edi
mov edx, dword [ebp + 8]
cmp dword [ebp - 0x12c], edx
je 0x4070bd
lea eax, [ebp - 0x134]
push eax
push esi
call ebx
test eax, eax
jne 0x407090
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041f152
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x11c]
mov ecx, dword [ebp - 8]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.0041f152
mov esp, ebp
pop ebp
ret 4
Function at 0x40afb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov ecx, dword [0x444860]
push esi
mov esi, eax
mov eax, dword [0x444864]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x10], ecx
xor ecx, ecx
add eax, 0x10
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ecx
cmp ecx, dword [0x445de4]
jb 0x40aff5
ja 0x40b074
cmp eax, dword [0x445de0]
ja 0x40b074
cmp dword [0x44486c], 0xffffffff
jne 0x40b008
mov eax, 0xfffffffd
pop esi
mov esp, ebp
pop ebp
ret
push 0x445f0c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0xc]
mov eax, dword [0x445dd8]
push edx
push esi
push eax
call fcn.00421960
mov ecx, dword [0x444864]
add esp, 0xc
xor eax, eax
lea edx, [ebp - 0x28]
push edx
push eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
push 8
lea eax, [ebp - 0xc]
mov dword [ebp - 0x18], ecx
mov ecx, dword [0x44486c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b07e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x40b07e
push 0x445f0c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffc
pop esi
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push 0
lea edx, [ebp - 0x14]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x40b0b1
mov eax, dword [0x44486c]
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
push 0x445f0c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x444860]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x44486c]
test eax, eax
jne 0x40b0e4
push edx
call dword [sym.imp.KERNEL32.dll_CancelIo]
push 0x445f0c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
push 0x445f0c
test eax, eax
je 0x40b0a3
mov esi, dword [ebp - 4]
neg esi
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi - 1]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40cd20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0x445f24
mov esi, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x44486c], 0xffffffff
je 0x40cda2
cmp dword [0x444870], 0xffffffff
jne 0x40cda2
test esi, esi
je 0x40cda2
mov eax, dword [0x444860]
mov dword [0x445dfc], esi
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
call esi
mov ecx, dword [0x44485c]
push ecx
call esi
mov edx, dword [0x444858]
push edx
call esi
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x40bd70
push 0
push 0
call fcn.00420df6
add esp, 0x18
test eax, eax
jne 0x40cdb5
mov ecx, dword [0x44485c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [0x444870], 0xffffffff
push 0x445f24
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [0x444858]
push 0xffffffffffffffff
push edx
mov dword [0x444870], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x445f24
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40d020
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40d081
lea eax, [ebp - 0x18]
push eax
push 0x20
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40d07e
lea ecx, [ebp - 0x20]
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x40d091
mov edx, dword [ebp - 0x18]
push edx
call edi
push esi
call edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0041f152
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
push 0
push eax
mov dword [ebp - 0x14], 1
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x40d078
mov ecx, dword [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
jmp 0x40d07c
Function at 0x40d190
Capabilities:
Create service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov byte [ebp - 0x109], 0
call fcn.0040d8e0
push esi
push str.system32drivers_s.sys
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00420fc4
add esp, 0x10
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x40d1f1
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f152
mov esp, ebp
pop ebp
ret
push ebx
push 0
push 0
push 0
push 0
push str.PNP_TDI
lea ecx, [ebp - 0x108]
push ecx
push 1
push 1
push 1
push 0xf01ff
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x40d239
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
je 0x40d256
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x40d24f
mov byte [ebp - 0x109], 1
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
mov ecx, esi
call fcn.0040d4e0
mov ecx, dword [ebp - 4]
add esp, 4
xor eax, eax
cmp byte [ebp - 0x109], al
pop ebx
setne al
xor ecx, ebp
pop edi
dec eax
call fcn.0041f152
mov esp, ebp
pop ebp
ret

Function at 0x40d290
Capabilities:
Delete service

Disassembly:
push ebx
push esi
mov esi, eax
push edi
push 1
mov ecx, esi
xor bl, bl
call fcn.0040d4e0
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40d2e2
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x40d2db
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov bl, 1
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
test bl, bl
setne al
pop edi
pop esi
pop ebx
dec eax
ret
Function at 0x40d2f0
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push eax
push str.SYSTEMCurrentControlSetServices_s
lea eax, [ebp - 0x108]
push 0x104
push eax
mov esi, ecx
call fcn.00420fc4
add esp, 0x10
lea ecx, [ebp - 0x10c]
push ecx
push 3
push 0
lea edx, [ebp - 0x108]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40d355
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f152
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 8], 0
je 0x40d38a
mov edx, dword [ebp - 0x10c]
lea eax, [ebp - 0x110]
push eax
push esi
lea ecx, [ebp - 0x114]
push ecx
push 0
push 0x43d360
push edx
mov dword [ebp - 0x110], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jmp 0x40d3a3
mov eax, dword [ebp - 0x10c]
push 4
push esi
push 4
push 0
push 0x43d360
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x10c]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
sete al
xor ecx, ebp
pop esi
call fcn.0041f152
mov esp, ebp
pop ebp
ret

Function at 0x40d3d0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, eax
lea eax, [ebp - 4]
push eax
push 3
push 0
push str.SYSTEMCurrentControlSetControlGroupOrderList
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40d3fc
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 8], 0
push edi
je 0x40d499
mov edx, dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push esi
push 0
lea ecx, [ebp - 8]
push ecx
push 0
push str.PNP_TDI
push edx
call edi
test eax, eax
je 0x40d437
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
add ecx, 4
push ecx
call fcn.0042060c
add esp, 4
mov dword [ebx], eax
test eax, eax
jne 0x40d45d
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push esi
push eax
lea eax, [ebp - 8]
push eax
push 0
push str.PNP_TDI
push ecx
call edi
mov esi, eax
test esi, esi
je 0x40d4c7
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebx]
push eax
call fcn.0041f741
add esp, 4
pop edi
mov dword [ebx], 0
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
cmp eax, 4
jbe 0x40d4a8
shr eax, 2
lea ecx, [eax - 1]
jmp 0x40d4aa
xor ecx, ecx
mov eax, dword [ebx]
mov dword [eax], ecx
mov ecx, dword [esi]
mov edx, dword [ebp - 4]
push ecx
push eax
push 3
push 0
push str.PNP_TDI
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40d8e0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [ebp - 4]
push eax
push 2
push 0
push str.SYSTEMCurrentControlSetServicesTcpip6Parameters
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40d908
xor al, al
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push esi
push 4
lea ecx, [ebp - 8]
push ecx
push 4
push 0
push str.DisabledComponents
push edx
mov dword [ebp - 8], 0x8e
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40df90
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov esi, eax
movzx ecx, di
shr edi, 0x10
test esi, esi
jne 0x40dfaf
pop edi
lea eax, [esi + 1]
pop esi
pop ebx
pop ebp
ret
test ebx, ebx
je 0x40e0b7
jmp 0x40dfc0
mov eax, ebx
cmp ebx, 0x15b0
jb 0x40dfcf
mov eax, 0x15b0
sub ebx, eax
mov dword [ebp + 8], ebx
cmp eax, 0x10
jl 0x40e07c
mov edx, eax
shr edx, 4
mov ebx, edx
neg ebx
shl ebx, 4
add eax, ebx
jmp 0x40dff0
movzx ebx, byte [esi]
add ecx, ebx
movzx ebx, byte [esi + 1]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 2]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 3]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 4]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 5]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 6]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 7]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 8]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 9]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xa]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xb]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xc]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xd]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xe]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xf]
add edi, ecx
add ecx, ebx
add edi, ecx
add esi, 0x10
dec edx
jne 0x40dff0
mov ebx, dword [ebp + 8]
test eax, eax
je 0x40e08b
movzx edx, byte [esi]
add ecx, edx
inc esi
add edi, ecx
dec eax
jne 0x40e080
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff000f
add ecx, edx
mov eax, 0x80078071
mul edi
shr edx, 0xf
imul edx, edx, 0xffff000f
add edi, edx
test ebx, ebx
jne 0x40dfc0
mov eax, edi
pop edi
shl eax, 0x10
pop esi
or eax, ecx
pop ebx
pop ebp
ret

Function at 0x40e0d0
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test ecx, ecx
jne 0x40e0db
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
pop ebp
jmp fcn.0040e0f0
Function at 0x40e600
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, dword [esi + 0x24]
mov dword [ebp - 0xc], edi
jmp 0x40e613
mov edi, dword [ebp - 0xc]
mov ebx, dword [esi + 0x34]
sub ebx, dword [esi + 0x6c]
mov eax, dword [esi + 0x64]
mov ecx, dword [esi + 0x24]
sub ebx, eax
lea edx, [edi + ecx - 0x106]
mov dword [ebp - 4], ebx
cmp eax, edx
jb 0x40e68d
mov eax, dword [esi + 0x30]
push edi
lea ecx, [eax + edi]
push ecx
push eax
call fcn.00421960
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x3c]
sub dword [esi + 0x68], edi
sub dword [esi + 0x64], edi
add esp, 0xc
sub dword [esi + 0x54], edi
lea ecx, [eax + edx*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, edi
jb 0x40e661
sub eax, edi
jmp 0x40e663
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x40e652
mov ecx, dword [esi + 0x38]
mov edx, edi
lea ecx, [ecx + edi*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, edi
jb 0x40e680
sub eax, edi
jmp 0x40e682
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x40e671
add ebx, edi
mov dword [ebp - 4], ebx
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x40e744
mov edx, dword [esi + 0x6c]
add edx, dword [esi + 0x64]
mov eax, dword [edi + 4]
add edx, dword [esi + 0x30]
mov ecx, dword [ebp - 4]
mov ebx, eax
mov dword [ebp - 8], edx
cmp ebx, ecx
jbe 0x40e6b3
mov ebx, ecx
test ebx, ebx
je 0x40e708
sub eax, ebx
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x40e6d7
mov eax, dword [edi]
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0040df90
add esp, 4
jmp 0x40e6f0
cmp eax, 2
jne 0x40e6f6
mov ecx, dword [edi]
mov eax, dword [edi + 0x30]
test ecx, ecx
jne 0x40e6e9
xor eax, eax
jmp 0x40e6f3
mov edx, ebx
call fcn.0040e0f0
mov edx, dword [ebp - 8]
mov dword [edi + 0x30], eax
mov ecx, dword [edi]
push ebx
push ecx
push edx
call fcn.00421960
add dword [edi], ebx
add esp, 0xc
add dword [edi + 8], ebx
add dword [esi + 0x6c], ebx
mov edi, dword [esi + 0x6c]
cmp edi, 3
jb 0x40e730
mov edx, dword [esi + 0x64]
add edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x50]
movzx eax, byte [edx]
mov dword [esi + 0x40], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x4c]
mov dword [esi + 0x40], eax
cmp edi, 0x106
jae 0x40e744
mov edx, dword [esi]
cmp dword [edx + 4], 0
jne 0x40e610
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x412950
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 4]
sub esp, 8
cmp eax, 0xffffffff
jne 0x412966
xor eax, eax
xor edx, edx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x4131f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov ecx, dword [esi + 4]
push edi
xor edi, edi
cmp ecx, edi
je 0x413217
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov dword [esi + 4], edi
push 0x28
call fcn.00420505
add esp, 4
cmp eax, edi
je 0x4132b5
mov dword [eax], vtable.StLibs::MemoryStream.0
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], vtable.StLibs::IOB.0
mov dword [eax + 0x14], edi
mov dword [eax + 0x18], edi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x20], 0x6400000
mov ecx, 1
mov dword [eax + 0x24], ecx
mov dword [esi + 4], eax
mov dword [esi + 8], 0x40000
add esi, 0xe
xor eax, eax
mov word [esi], ax
test byte [0x446318], cl
jne 0x413281
or dword [0x446318], ecx
push 0x435ad0
call fcn.00420d1a
add esp, 4
lea ecx, [ebp - 0x20]
mov eax, 0x446110
call fcn.004183f0
cmp dword [ebp - 0x10], edi
je 0x4132c7
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41329f
lea eax, [ebp - 0x20]
push eax
push 0x43d744
push esi
mov edx, 0x104
call fcn.004130b0
add esp, 0xc
jmp 0x4132d3
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f152
mov esp, ebp
pop ebp
ret
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp dword [ebp - 0xc], 8
jb 0x4132e5
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.004200ee
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov al, 1
pop esi
call fcn.0041f152
mov esp, ebp
pop ebp
ret
Function at 0x413350
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x443630]
xor eax, esp
mov dword [esp + 0x220], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x413392
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0041f152
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp + 0xc]
mov edx, dword [ecx]
push esi
push eax
mov eax, dword [edx + 0x10]
call eax
mov ebx, eax
mov dword [esp + 0xc], ebx
test ebx, ebx
je 0x413379
cmp byte [edi + 0xc], 0
jne 0x4134b9
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov esi, dword [edi + 8]
xor ecx, ecx
cmp edx, ecx
jb 0x4134b9
ja 0x4133d3
cmp eax, esi
jbe 0x4134b9
lea ecx, [esp + 0x20]
push ecx
push 0
push 0x43d74c
lea edx, [edi + 0xe]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4134b9
push 8
call fcn.00420505
mov esi, eax
add esp, 4
test esi, esi
je 0x4134b9
lea eax, [esp + 0x20]
push eax
mov dword [esi], vtable.StLibs::FileStream.0
mov dword [esi + 4], 0xffffffff
call fcn.00412820
push 1
test al, al
jne 0x41342f
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
jmp 0x4134b9
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 0
push 0
call eax
mov ecx, dword [edi + 4]
mov dword [esp + 0x14], edx
mov edx, dword [ecx]
mov dword [esp + 0x10], eax
mov eax, dword [edx + 0x18]
push esi
call eax
mov ecx, dword [edi + 4]
mov dword [esp + 0x1c], edx
mov edx, dword [ecx]
mov ebx, eax
mov eax, dword [edx + 0x14]
call eax
cmp ebx, eax
jne 0x41346a
cmp dword [esp + 0x1c], edx
je 0x41348f
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0041f152
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push 0
mov dword [edi + 4], esi
mov edx, dword [esi]
mov edx, dword [edx + 8]
push eax
push ecx
mov ecx, esi
call edx
mov ebx, dword [esp + 0xc]
mov byte [edi + 0xc], 1
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0041f152
mov esp, ebp
pop ebp
ret 8
Function at 0x417e60
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4354e8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
mov eax, dword [0x443630]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
xor esi, esi
mov dword [esp + 0xc], vtable.StLibs::IOB.0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 0x6400000
mov dword [esp + 0x20], 1
mov dword [esp + 0x30], esi
mov ebx, 0xa
lea ebx, [ebx]
add ebx, ebx
cmp ebx, 0x2002
jbe 0x417ec0
cmp ebx, 0x6400000
jb 0x417ed7
mov ebx, 0x2002
push ebx
call fcn.0042060c
add esp, 4
test eax, eax
je 0x417f00
mov dword [esp + 0x18], ebx
mov esi, eax
mov ebx, 0x2001
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebx
mov byte [eax + 0x2001], 0
jmp 0x417f04
mov ebx, dword [esp + 0x14]
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
or eax, edx
je 0x417f53
mov eax, dword [edi]
mov edx, dword [eax + 8]
push 0
push 0
push 0
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
push ebx
push esi
mov ecx, edi
call edx
test eax, eax
je 0x417f53
nop
mov ecx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push esi
push eax
push 1
push ecx
mov ecx, dword [ebp + 8]
call fcn.004171c0
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
push ebx
push esi
mov ecx, edi
call eax
test eax, eax
jne 0x417f30
test esi, esi
je 0x417f60
push esi
call fcn.0041f741
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x418310
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x443630]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, esi
sub edx, esi
jmp 0x418330
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x418330
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x10
push 3
push 0
push 0
push 0x40000000
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 0xffffffff
je 0x41836d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x418372
push 0
push esi
call ebx
lea edx, [ebp - 0x20c]
mov eax, esi
sub edx, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x418380
push 0
push 0x10
push 3
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call edi
cmp eax, 0xffffffff
je 0x4183c5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f152
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0x20c]
push ecx
call ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0041f152
mov esp, ebp
pop ebp
ret