joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45d860
Capabilities:
Get thread local storage value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], eax
lea eax, [ebx + 0x10]
mov dword [ebp - 8], eax
mov eax, dword [0x522c14]
push esi
push edi
cmp eax, 0xffffffff
jne 0x45d8b5
call fcn.00466100
test eax, eax
jne 0x45d8b0
mov ecx, 0x502038
jmp 0x45d8c6
mov dword [0x522c14], eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
mov ecx, 0x502038
cmovne ecx, eax
mov edi, ecx
mov dword [ebp - 0xc], ecx
lea edx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x45d8d0
sub edi, edx
je 0x45d981
test edi, edi
je 0x45d941
or esi, 0xffffffff
lea eax, [edi - 1]
cmp eax, esi
cmovb esi, eax
add esi, ecx
cmp byte [esi], 0x3a
je 0x45d8ff
cmp esi, ecx
je 0x45d941
dec esi
cmp byte [esi], 0x3a
jne 0x45d8f5
sub esi, ecx
cmp esi, 0xffffffff
je 0x45d941
lea edx, [esi + 1]
cmp edi, edx
jb 0x45d9d7
push dword [ebx + 0xc]
mov eax, edi
add ecx, edx
push dword [ebx + 8]
sub eax, edx
mov edx, 0xffffffff
cmp eax, 0xffffffff
cmovb edx, eax
call fcn.0042b8f0
add esp, 8
test al, al
je 0x45d941
mov eax, dword [ebp - 0xc]
cmp edi, esi
mov dword [ebp - 0xc], eax
cmovb esi, edi
mov edi, esi
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 8]
call fcn.0045d9e0
mov ecx, dword [ebp - 0xc]
sub esp, 0x10
mov dword [ebp - 0x18], ecx
mov ecx, esp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], 0x45de20
push 9
mov dword [ecx], 0xfd
mov dword [ecx + 4], 0
mov dword [ecx + 8], eax
push 0x5095ac
jmp 0x45d9b6
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 8]
call fcn.0045d9e0
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x10]
sub esp, 0x10
mov dword [ebp - 0xc], 0x45de20
mov eax, esp
push 2
mov dword [eax], 0xf
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
push 0x505208
mov esi, dword [ebp - 0x1c]
push esi
call fcn.0049e1b0
mov ecx, dword [ebp - 4]
add esp, 0x1c
mov eax, esi
xor ecx, ebp
pop edi
pop esi
call fcn.004a4c5b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0040cc30
int3
Function at 0x467c90
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e90f6
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x522104]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
lea eax, [esi + 0xc]
mov dword [ebp - 4], 0
push eax
mov dword [esi], vtable.asw::mi::ModuleDestructions.0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [ebp - 4], 1
mov dword [esi + 0x24], 0
push 0x40
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
call fcn.004a4ca1
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x28], eax
mov byte [ebp - 4], 2
push 0x40
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
call fcn.004a4ca1
add esp, 8
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x30], eax
mov eax, esi
mov byte [esi + 0x38], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x467e70
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x522104]
xor eax, esp
mov dword [esp + 0x68], eax
push esi
mov esi, dword [ebp + 8]
push edx
mov edx, ecx
mov dword [esp + 0x20], 0
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], 0x67452301
mov dword [esp + 0x10], 0xefcdab89
mov dword [esp + 0x14], 0x98badcfe
mov dword [esp + 0x18], 0x10325476
call fcn.00467f30
add esp, 4
test esi, esi
je 0x467f1e
mov edx, dword [esp + 0x18]
mov ecx, 0x78
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x64], edx
shr edx, 3
mov dword [esp + 0x68], eax
and edx, 0x3f
sub ecx, edx
mov eax, 0x38
sub eax, edx
cmp edx, 0x38
mov edx, 0x509828
cmovae eax, ecx
lea ecx, [esp + 8]
push eax
call fcn.00467f30
push 8
lea edx, [esp + 0x6c]
lea ecx, [esp + 0x10]
call fcn.00467f30
movups xmm0, xmmword [esp + 0x10]
add esp, 8
movups xmmword [esi], xmm0
mov ecx, dword [esp + 0x6c]
pop esi
xor ecx, esp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x46cae0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x401c
call fcn.004a5850
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x529c80]
push ebx
push esi
xor bl, bl
mov dword [ebp - 0x400c], 0
xor esi, esi
mov word [ebp - 0x4008], 0x500
cmp eax, 0x10
jl 0x46cb2c
cmp eax, 0xf
jl 0x46cb2c
mov ecx, 0xfffffffc
mov dword [ebp - 0x4018], ecx
jmp 0x46cb66
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x4018]
push ecx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x46cb50
mov ecx, dword [ebp - 0x4018]
mov esi, ecx
jmp 0x46cb66
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov dword [ebp - 0x4018], ecx
test eax, eax
jne 0x46cc79
lea eax, [ebp - 0x4014]
mov dword [ebp - 0x4010], 0
push eax
push 4
lea eax, [ebp - 0x4010]
push eax
push 0x14
push ecx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x46cc6e
cmp dword [ebp - 0x4010], 0
je 0x46cc6e
lea eax, [ebp - 0x4014]
push eax
push 0x4000
lea eax, [ebp - 0x4004]
push eax
push 2
push dword [ebp - 0x4018]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x46cc6e
test esi, esi
je 0x46cbd2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x401c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x400c]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
xor esi, esi
cmp dword [ebp - 0x4004], esi
jbe 0x46cc50
nop word [eax + eax]
push dword [ebp + esi*8 - 0x4000]
push dword [ebp - 0x401c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x46cc4e
inc esi
cmp esi, dword [ebp - 0x4004]
jb 0x46cc10
push dword [ebp - 0x401c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov bl, 1
push dword [ebp - 0x401c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x46cc79
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor al, al
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x46d0d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea esi, [ebp - 0x20c]
mov dword [ebp - 0x418], edx
push 0x104
mov eax, esi
mov ebx, ecx
push eax
push ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0x104
jne 0x46d12c
push 0x10000
call fcn.004b1550
mov esi, eax
add esp, 4
test esi, esi
je 0x46d195
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x46d19d
cmp byte [ebp + 8], 0
je 0x46d166
push 0x104
lea eax, [ebp - 0x414]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x46d166
lea eax, [ebp - 0x20c]
cmp esi, eax
je 0x46d160
push esi
call fcn.004b1560
add esp, 4
lea esi, [ebp - 0x414]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46d19d
mov edx, esi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x46d177
sub edx, ecx
mov ecx, dword [ebp - 0x418]
sar edx, 1
push edx
push esi
call fcn.0040a770
jmp 0x46d1a5
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [ebp - 0x20c]
cmp esi, eax
je 0x46d1c2
lea eax, [ebp - 0x414]
cmp esi, eax
je 0x46d1c2
push esi
call fcn.004b1560
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x46d690
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, edx
mov edx, ecx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], edx
push edi
mov edi, dword [ebp + 8]
test edx, edx
je 0x46d800
test eax, eax
je 0x46d800
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x46d6d1
mov ecx, dword [edi]
push ebx
push esi
xor esi, esi
mov dword [edi + 0x10], 0
mov word [ecx], si
xor ecx, ecx
mov word [ebp - 0x20c], cx
lea ecx, [ebp - 0x210]
push ecx
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x210], 0x208
push ecx
push esi
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp esi, 0xea
jne 0x46d7bb
mov eax, dword [ebp - 0x210]
add eax, 2
push 0x4f421c
push eax
mov dword [ebp - 0x214], eax
call fcn.004a4cd6
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x46d7a3
lea eax, [ebp - 0x214]
push eax
push ebx
push 0
push 0
push dword [ebp - 0x218]
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x46d787
mov eax, dword [ebp - 0x214]
shr eax, 1
je 0x46d77e
lea edx, [eax - 1]
lea edx, [ebx + edx*2]
nop
cmp word [edx], 0
jne 0x46d77e
sub edx, 2
sub eax, 1
jne 0x46d770
push eax
push ebx
mov ecx, edi
call fcn.0040a770
push ebx
call fcn.004a4cd1
add esp, 4
mov eax, esi
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov esi, 8
mov eax, esi
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x46d7ed
mov eax, dword [ebp - 0x210]
shr eax, 1
je 0x46d7de
lea ecx, [ebp + eax*2 - 0x20e]
cmp word [ecx], 0
jne 0x46d7de
sub ecx, 2
sub eax, 1
jne 0x46d7d0
push eax
lea eax, [ebp - 0x20c]
mov ecx, edi
push eax
call fcn.0040a770
mov eax, esi
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x57
xor ecx, ebp
pop edi
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x4706b0
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, edx
push edi
mov edi, dword [ebp + 0x18]
test ecx, 0x400
je 0x4706c8
or dword [esi], 0x80
test ecx, 0x800
je 0x4706d6
or dword [esi], 0x100
test cl, 1
je 0x4706e1
or dword [esi], 0x80000000
test ecx, 0x100
je 0x4706ef
or dword [esi], 0x20000000
test ecx, 0x200
je 0x4706fd
or dword [esi], 0x10000
test cl, cl
jns 0x470704
or dword [esi], 4
mov edx, dword [ebp + 8]
test cl, 2
je 0x470714
or dword [esi], 0x40000000
jmp 0x470724
test cl, 4
je 0x470724
mov eax, dword [esi]
mov dword [edx], eax
or eax, 0x100
mov dword [esi], eax
mov edx, ecx
and edx, 0x20000000
push ebx
test cl, 8
je 0x47074f
test edx, edx
mov eax, 5
mov ebx, 2
cmove ebx, eax
mov eax, dword [ebp + 0x10]
neg edx
sbb edx, edx
add edx, 2
mov dword [eax], edx
jmp 0x47076e
mov eax, dword [ebp + 0x10]
test edx, edx
je 0x470763
mov dword [eax], 4
mov ebx, 3
jmp 0x47076e
mov dword [eax], 3
mov ebx, 1
mov eax, dword [ebp + 0xc]
mov dword [edi], ebx
pop ebx
test cl, 0x10
je 0x47077c
or dword [eax], 1
test cl, 0x20
je 0x470784
or dword [eax], 2
test cl, 0x40
je 0x47078c
or dword [eax], 4
mov edx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x14]
test ecx, ecx
jns 0x4707a2
or dword [edi], 0x4000000
or dword [edx], 0x1000
test ecx, 0x10000000
je 0x4707b6
or dword [edi], 0x2000000
or dword [edx], 0x4000
test ecx, 0x8000000
je 0x4707c7
or dword [edi], 0x2000000
or dword [edx], 1
test ecx, 0x40000
je 0x4707db
or dword [edi], 0x200000
or dword [edx], 0x200000
mov eax, ecx
and eax, 0x7000000
je 0x470835
cmp eax, 0x6000000
ja 0x470825
je 0x47081a
cmp eax, 0x4000000
je 0x470809
cmp eax, 0x5000000
jne 0x470835
or dword [edi], 0x10000000
or dword [edx], 0x800
jmp 0x470835
mov eax, dword [ebp + 0x20]
or dword [edi], 0x2100
or dword [eax], 0x2100
jmp 0x470835
or dword [edi], 0x8000000
or dword [edx], 4
jmp 0x470835
cmp eax, 0x7000000
jne 0x470835
or dword [edi], 0x80000000
or dword [edx], 2
test ecx, 0x10000
jne 0x470858
or dword [esi], 0x100000
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x470853
or eax, 0x100000
mov dword [esi], eax
or dword [edx], 0x20
jmp 0x47085e
or dword [edi], 0x40000000
pop edi
pop esi
test ecx, 0xc000
je 0x47086e
or dword [edx], 0x100
pop ebp
ret
Function at 0x472450
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, edx
mov esi, ecx
push edi
mov dword [ebx], 0
cmp word [esi], 0x2a
jne 0x4724d4
push 5
lea eax, [esi + 2]
push str.FILE:
push eax
call fcn.004be6e2
add esp, 0xc
test eax, eax
jne 0x4724d4
push 0x10
push eax
lea eax, [esi + 0xc]
push eax
call fcn.004bc82f
add esp, 0xc
cmp eax, 0xffffffff
je 0x4724d4
push 0
lea edx, [ebp - 0x48]
mov dword [ebp - 8], 0x10002
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], eax
call fcn.004721d0
or ecx, 0xffffffff
add esp, 4
test eax, eax
cmove ecx, dword [ebp - 0x48]
mov dword [ebx], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov eax, dword [0x529c14]
xor edi, edi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4724f8
push edi
mov ecx, eax
call dword [0x4ee33c]
call dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x47250e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov esi, dword [0x529c14]
test esi, esi
je 0x472525
push dword [ebp - 0x10]
mov ecx, esi
call dword [0x4ee33c]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x472540
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [0x529c08], 0
push ebx
push esi
push edi
mov edi, edx
mov esi, ecx
je 0x4726cf
cmp dword [0x529bf8], 0
je 0x4726cf
push 4
push 0x50a118
push esi
call fcn.004be6e2
add esp, 0xc
test eax, eax
jne 0x472588
add esi, 8
xorps xmm0, xmm0
mov dword [ebp - 0x10], 0
push 4
xor eax, eax
mov dword [ebp - 0xc], 7
movups xmmword [ebp - 0x20], xmm0
push 0x50a100
lea ecx, [ebp - 0x20]
mov word [ebp - 0x20], ax
call fcn.0040a770
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4725b7
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x20]
call fcn.0040a6b0
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
mov esi, dword [0x529c18]
mov ecx, esi
cmovae eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
call dword [0x4ee33c]
call esi
mov ecx, 0x40
test edi, edi
je 0x47260f
cmp dword [edi + 0x808], 0
mov eax, dword [edi + 0x804]
je 0x472611
mov ecx, 0x42
jmp 0x472611
xor eax, eax
mov esi, dword [0x529c08]
push 0
push 0
push 1
push 3
push 0
push 0x10
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x30]
push 0
push eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x40], ecx
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x4c], 0x18
push 1
lea eax, [ebp - 0x34]
mov dword [ebp - 0x44], ecx
push eax
mov ecx, esi
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x38], 0
call dword [0x4ee33c]
call esi
mov edi, eax
test edi, edi
jne 0x47269d
push dword [ebp - 0x34]
mov esi, dword [0x529bf8]
mov ecx, esi
call dword [0x4ee33c]
call esi
cmp dword [ebp - 0x2c], 1
jne 0x4726b4
lea ecx, [ebp - 0x20]
mov edi, 0xb7
call fcn.0040ab30
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov esi, dword [0x529c10]
test esi, esi
je 0x4726b4
push edi
mov ecx, esi
call dword [0x4ee33c]
call esi
mov edi, eax
lea ecx, [ebp - 0x20]
call fcn.0040ab30
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov ebx, dword [0x529c14]
mov dword [ebp - 0x34], 1
test ebx, ebx
je 0x4726ef
push 0
mov ecx, ebx
call dword [0x4ee33c]
call ebx
mov dword [ebp - 0x34], eax
lea eax, [edi + 0x800]
neg edi
sbb edi, edi
and edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x472711
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x472713
xor ebx, ebx
mov esi, dword [0x529c14]
test esi, esi
je 0x47272a
push dword [ebp - 0x34]
mov ecx, esi
call dword [0x4ee33c]
call esi
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x472740
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10008
call fcn.004a5850
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x529c14]
push edi
xor edi, edi
mov dword [ebp - 0x10008], ecx
lea ebx, [edi + 1]
test esi, esi
je 0x47277c
push edi
mov ecx, esi
call dword [0x4ee33c]
call esi
mov ebx, eax
lea eax, [ebp - 0x10004]
push eax
push 0x8000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x47279c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x4727c7
lea edx, [ebp - 0x10004]
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4727a5
mov ecx, dword [ebp - 0x10008]
lea eax, [ebp - 0x10004]
sub edx, esi
sar edx, 1
push edx
push eax
call fcn.0040a770
mov esi, dword [0x529c14]
test esi, esi
je 0x4727dc
push ebx
mov ecx, esi
call dword [0x4ee33c]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret

Function at 0x473160
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov ebx, ecx
mov edi, edx
mov dword [ebp - 0x210], edi
test ebx, ebx
je 0x4732a8
cmp word [ebx], 0
je 0x4732a8
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
je 0x47328f
cmp esi, 0x104
jae 0x4731d9
push esi
lea eax, [ebp - 0x20c]
mov ecx, edi
push eax
call fcn.0040a770
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b1550
mov edi, eax
add esp, 4
test edi, edi
je 0x473277
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x473253
cmp eax, esi
jae 0x473232
mov ecx, dword [ebp - 0x210]
push esi
push edi
call fcn.0040a770
push edi
call fcn.004b1560
add esp, 4
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
push edi
mov esi, 0x7a
call fcn.004b1560
add esp, 4
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call fcn.004b1560
add esp, 4
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov esi, 8
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x57
pop edi
xor ecx, ebp
pop ebx
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
Function at 0x47a260
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov ecx, 0x52738c
push 0
call fcn.004a620f
mov edi, eax
mov esi, 1
test edi, edi
je 0x47a3a7
mov ebx, dword [ebp + 8]
mov eax, ebx
shr eax, 4
mov dword [ebp - 8], eax
inc eax
movzx eax, ax
mov dword [ebp - 4], eax
nop dword [eax]
push 0
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x47a2c1
push ebx
mov edx, eax
mov ecx, edi
call fcn.0047afb0
add esp, 4
test eax, eax
jne 0x47a2dc
push esi
mov ecx, 0x52738c
inc esi
call fcn.004a620f
mov edi, eax
test edi, edi
je 0x47a3a7
mov eax, dword [ebp - 4]
jmp 0x47a2a0
test edi, edi
je 0x47a3a7
mov eax, dword [ebp - 8]
inc eax
push 6
movzx eax, ax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 8], eax
test eax, eax
je 0x47a3a7
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x47a3a7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x47a3a7
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and ebx, 0xf
jbe 0x47a345
cmp esi, ecx
jae 0x47a3a7
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ebx, 1
jne 0x47a333
cmp esi, ecx
jae 0x47a3a7
cmp word [esi], 0
je 0x47a3a7
mov ebx, dword [ebp - 0xc]
mov ecx, 1
movzx edi, word [esi]
mov eax, dword [ebx]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or ecx, eax
jge 0x47a370
push edi
mov ecx, ebx
call fcn.0047a3c0
movzx ecx, word [esi]
lea eax, [esi + 2]
push ecx
push eax
push edi
push dword [ebx]
call fcn.004bf2ea
push eax
call fcn.0047b020
mov eax, dword [ebx]
add esp, 0x14
cmp edi, dword [eax - 8]
jg 0x47a3b2
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + edi*2], cx
lea eax, [ecx + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.004274c0
int3

Function at 0x47afb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x47b00b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x47b00b
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x47aff8
cmp esi, edx
jae 0x47b00b
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x47afe6
cmp esi, edx
jae 0x47b00b
xor eax, eax
cmp word [esi], ax
pop edi
cmove esi, eax
mov eax, esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x47cac0
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
cmp dword [0x529cf4], esi
jne 0x47cafd
sub esp, 8
lea ecx, [esi + 1]
call fcn.0047c870
mov esi, eax
add esp, 8
test esi, esi
jne 0x47cbd4
or dword [0x529cfc], 2
mov eax, dword [0x529cf4]
test eax, eax
je 0x47cb0d
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x529cf8]
mov ecx, eax
inc eax
mov dword [0x529cf8], eax
test ecx, ecx
jne 0x47cbc2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004be592
add esp, 4
xor eax, eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x210]
push 0x104
push eax
push str._SystemRoot_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ax, word [ebp - 0x210]
xor ecx, ecx
cmp cx, ax
je 0x47cb69
mov ecx, 0x25
cmp cx, ax
jne 0x47cb8d
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x210]
push eax
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, 4
call fcn.0046bf00
mov esi, eax
test esi, esi
jne 0x47cbbd
or dword [0x529cfc], 1
mov cl, 1
call fcn.0047b4d0
mov esi, eax
test esi, esi
jne 0x47cbbd
call fcn.0047bd40
call fcn.0047c710
jmp 0x47cbc2
call fcn.0047cbf0
mov eax, dword [0x529cf4]
test eax, eax
je 0x47cbd2
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret