joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46a6e0
Capabilities:
Get keyboard layout

Disassembly:
push ecx
push esi
mov esi, eax
movzx eax, word [esi]
cmp eax, 0x20
je 0x46a6f1
cmp eax, 9
jne 0x46a6f6
add esi, 2
jmp 0x46a6e4
movzx ecx, word [esi]
test cx, cx
jne 0x46a703
xor al, al
pop esi
pop ecx
ret
cmp word [esi + 2], 0
lea eax, [esi + 2]
jne 0x46a71d
mov eax, dword [esp + 0xc]
mov word [eax + 2], cx
mov byte [eax], 0
mov al, 1
pop esi
pop ecx
ret
push ebx
push ebp
push edi
mov edi, dword [esp + 0x18]
push 0x2b
xor bl, bl
push eax
mov byte [edi], 1
mov byte [esp + 0x1b], bl
call fcn.0048f331
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x46a7ec
lea eax, [ebp - 2]
cmp eax, esi
jbe 0x46a764
lea esp, [esp]
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x46a75d
cmp ecx, 9
jne 0x46a764
sub eax, 2
cmp eax, esi
ja 0x46a750
sub eax, esi
sar eax, 1
lea edi, [eax + 1]
push edi
push str.Ctrl
push esi
call fcn.0048eda7
add esp, 0xc
test eax, eax
jne 0x46a783
or bl, 1
jmp 0x46a7b1
push edi
push 0x4a314c
push esi
call fcn.0048eda7
add esp, 0xc
test eax, eax
jne 0x46a79b
or bl, 4
jmp 0x46a7b1
push edi
push str.Shift
push esi
call fcn.0048eda7
add esp, 0xc
test eax, eax
jne 0x46a824
or bl, 0x10
lea esi, [ebp + 2]
movzx eax, word [esi]
cmp eax, 0x20
je 0x46a7c1
cmp eax, 9
jne 0x46a7c6
add esi, 2
jmp 0x46a7b4
cmp word [esi], 0
je 0x46a824
lea eax, [esi + 2]
push 0x2b
push eax
call fcn.0048f331
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x46a742
mov edi, dword [esp + 0x18]
mov byte [esp + 0x13], bl
cmp word [esi + 2], 0
jne 0x46a830
push 1
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
movzx edx, word [esi]
push eax
lea ecx, [esp + 0x1b]
push ecx
push edx
call dword [sym.imp.USER32.dll_CharLowerW]
mov esi, eax
call fcn.00412a70
mov bl, byte [esp + 0x1f]
movzx eax, al
add esp, 0xc
mov word [edi + 2], ax
jmp 0x46a84e
pop edi
pop ebp
mov byte [esp + 0xb], bl
pop ebx
xor al, al
pop esi
pop ecx
ret
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push 0
xor ecx, ecx
mov eax, esi
call fcn.00412980
movzx ecx, al
add esp, 8
mov word [edi + 2], cx
test bl, 1
je 0x46a856
or byte [edi], 8
test bl, 4
je 0x46a85e
or byte [edi], 0x10
test bl, 0x10
je 0x46a866
or byte [edi], 4
cmp word [edi + 2], 0
pop edi
pop ebp
pop ebx
setne al
pop esi
pop ecx
ret
Function at 0x4704d0
Capabilities:
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x49ed18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov ecx, dword [ebx + 8]
push ebp
push esi
mov esi, dword [ebx + 4]
push edi
xor ebp, ebp
mov edx, ebx
xor eax, eax
lea edi, [esp + 0x10]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [ebx + 4], edi
mov dword [esp + 0x2c], ebp
cmp ecx, ebp
jle 0x4705f0
mov edi, edi
cmp eax, dword [esp + 0x3c]
jl 0x47055f
mov eax, dword [0x4c590c]
mov ecx, 0x44
mov esi, 0x4c8138
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov dword [eax + 0x2c], ebp
mov dword [0x4cc150], ebp
mov dword [0x4cc154], ebp
cmp dword [0x4c96a4], ebp
je 0x47055b
push 0x4c9d10
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [esp + 0x18]
mov ecx, dword [ebx]
lea eax, [eax + eax*2]
mov ecx, dword [ecx + eax*4]
mov eax, dword [esp + 0x34]
lea edx, [esp + 0xc]
push edx
mov edx, dword [esp + 0x3c]
push eax
push 0x4a28cc
push ecx
xor eax, eax
call fcn.0046d480
add esp, 0x10
test eax, eax
je 0x4705ab
cmp dword [esp + 0xc], ebp
jne 0x4705cc
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x1c]
jl 0x470520
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [edx + 4], ecx
jmp 0x4705f3
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
xor eax, eax
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
add esp, 0x24
ret 0xc
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, 3
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
add esp, 0x24
ret 0xc
mov dword [edx + 4], esi
mov ecx, dword [esp + 0x24]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebp
add esp, 0x24
ret 0xc
Function at 0x471620
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x20214
call fcn.00499d50
push esi
mov esi, ecx
push edi
mov edi, edx
test esi, esi
je 0x47163a
cmp word [esi], 0
jne 0x47163f
mov esi, str.ERROR
xor eax, eax
lea edx, [esp + 0xc]
push edx
mov word [esp + 0x220], ax
xor ecx, ecx
lea eax, [esp + 0x14]
push eax
mov word [esp + 0x10], cx
mov ecx, dword [esp + 0x20228]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp word [ebx], 0
je 0x4716bd
cmp word [edi], 0
jne 0x47167d
lea edi, [esp + 8]
lea edx, [esp + 0x10]
push edx
push 0xffff
lea eax, [esp + 0x224]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, dword [0x4c9450]
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x228]
push eax
push ecx
call fcn.00477e60
pop edi
pop esi
add esp, 0x20214
ret 4
cmp word [edi], 0
je 0x4716de
lea ecx, [esp + 0x10]
push ecx
push 0xffff
lea edx, [esp + 0x224]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
jmp 0x4716f6
lea eax, [esp + 0x10]
push eax
push 0xffff
lea ecx, [esp + 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesW]
test eax, eax
je 0x471698
lea eax, [esp + 0x21c]
cmp word [eax], 0
jne 0x471716
cmp word [eax + 2], 0
je 0x471698
mov edx, 0xa
mov word [eax], dx
add eax, 2
jmp 0x471701

Function at 0x471720
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x258
push ebx
push ebp
push esi
mov esi, eax
mov ebp, 1
push edi
mov dword [esp + 0x10], ebp
test esi, esi
je 0x47179c
cmp word [esi], 0
je 0x47179c
push 4
push 0x4bf4d0
push esi
call fcn.0049028b
add esp, 0xc
test eax, eax
mov eax, esi
jne 0x471758
lea eax, [esi + 8]
mov ebx, 0x4aca58
call fcn.004095d0
test eax, eax
je 0x47178b
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x47179c
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x258
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
setne al
test al, al
jne 0x47177e
push 0
push 0
push 1
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x47177e
mov edx, dword [esp + 0x26c]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4717c5
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
sub eax, esi
sar eax, 1
mov esi, eax
mov ecx, 0x5d
push 0
mov word [edx + esi*2], cx
lea edx, [esp + 0x18]
push edx
push 4
push 0x4bf340
push edi
lea ebx, [esi + esi + 2]
call ebp
test eax, eax
je 0x471822
cmp dword [esp + 0x14], 4
jne 0x471822
mov ecx, dword [esp + 0x26c]
push 0
lea eax, [esp + 0x18]
push eax
push ebx
push ecx
push edi
call ebp
test eax, eax
je 0x471822
cmp dword [esp + 0x14], ebx
je 0x47182a
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x471839
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x26c]
pop edi
xor edx, edx
mov word [eax + esi*2], dx
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x258
ret
Function at 0x472150
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x210
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push ebp
push esi
push edi
mov edi, dword [esp + 0x224]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push 0
push edi
mov dword [esp + 0x30], 0xff
call ebx
cmp eax, 0x103
je 0x472217
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [0x4c590c]
mov edx, dword [ecx + 0xd0]
lea eax, [esp + 0x14]
push eax
or edx, 0x20019
push edx
push 0
lea eax, [esp + 0x2c]
push eax
push edi
call ebp
mov esi, eax
test esi, esi
jne 0x472224
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00472150
mov edx, dword [esp + 0x18]
add esp, 4
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x472224
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov esi, eax
test esi, esi
jne 0x472224
lea ecx, [esp + 0x18]
push ecx
push eax
push eax
push eax
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
push esi
push edi
mov dword [esp + 0x30], 0xff
call ebx
cmp eax, 0x103
jne 0x47219a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret

Function at 0x472240
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x10]
push esi
test ebx, ebx
je 0x472330
test edi, edi
je 0x472259
cmp word [edi], 0
jne 0x472261
test ebp, ebp
je 0x472330
mov ecx, dword [0x4c590c]
mov edx, dword [ecx + 0xd0]
lea eax, [esp + 0x14]
push eax
or edx, 0x2001f
push edx
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x472302
mov eax, dword [esp + 0x14]
test ebp, ebp
jne 0x472319
push eax
call fcn.00472150
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x472302
mov eax, 1
test byte [0x4ccf24], al
jne 0x4722e0
or dword [0x4ccf24], eax
push str.RegDeleteKeyExW
push str.advapi32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4ccf20], eax
jmp 0x4722e5
mov eax, dword [0x4ccf20]
mov edx, dword [0x4c590c]
mov ecx, dword [edx + 0xd0]
test ecx, ecx
je 0x47230f
test eax, eax
je 0x47230f
push 0
push ecx
push edi
push ebx
call eax
mov esi, eax
cmp esi, 0xffffffff
jne 0x472335
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x472337
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x472300
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ecx, dword [esp + 0x14]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x472302
mov esi, 0x57
mov eax, esi
mov edx, dword [0x4c590c]
mov dword [edx + 0x30], eax
mov edx, dword [esp + 0x10]
test esi, esi
setne al
movzx ecx, al
push ecx
push edx
call fcn.0042e850
pop esi
pop ebp
pop ecx
ret 8
Function at 0x472a80
Capabilities:
Clear file content

Disassembly:
mov eax, dword [esi + 0x2c]
push ebx
push ebp
xor ebp, ebp
push edi
cmp eax, ebp
je 0x472aa6
sub eax, dword [esi + 0x30]
mov edi, dword [esi]
sub eax, dword [esi + 8]
push 1
cdq
push edx
push eax
mov eax, dword [edi + 0x14]
mov ecx, esi
call eax
mov dword [esi + 0x2c], ebp
mov dword [esi + 8], ebp
mov eax, dword [esi + 8]
cmp eax, ebp
je 0x472ac3
cmp dword [esi + 0x2c], ebp
jne 0x472ac3
mov edx, dword [esi]
mov edx, dword [edx + 0x10]
push eax
mov eax, dword [esi + 0x30]
push eax
mov ecx, esi
call edx
mov dword [esi + 8], ebp
mov edx, dword [esi]
xor eax, eax
mov word [esi + 0x28], ax
mov eax, dword [edx + 0x18]
mov ecx, esi
call eax
push ebp
mov ebp, dword [esp + 0x18]
mov ebx, edx
mov edx, dword [esi]
mov edx, dword [edx + 0x14]
mov edi, eax
mov eax, dword [esp + 0x14]
push ebp
push eax
mov ecx, esi
call edx
test al, al
je 0x472b30
mov eax, dword [esi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x472b30
cmp ebp, ebx
jg 0x472b10
jl 0x472b08
cmp dword [esp + 0x10], edi
jae 0x472b10
mov eax, dword [esp + 0x10]
mov ecx, ebp
jmp 0x472b14
mov eax, edi
mov ecx, ebx
mov edx, dword [esi]
push 0
push ecx
push eax
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x1c]
mov ecx, esi
call eax
pop edi
pop ebp
pop ebx
ret 8
pop edi
or eax, 0xffffffff
pop ebp
or edx, eax
pop ebx
ret 8

Function at 0x475d90
Capabilities:
Get file attributes

Disassembly:
sub esp, 0x258
push ebx
test esi, esi
je 0x475e11
cmp word [esi], 0
je 0x475e11
push 4
push 0x4bf4d0
push esi
call fcn.0049028b
add esp, 0xc
test eax, eax
mov eax, esi
jne 0x475dba
lea eax, [esi + 8]
mov ebx, 0x4aca58
call fcn.004095d0
test eax, eax
je 0x475df4
lea eax, [esp + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x475e11
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test edi, edi
je 0x475dea
mov ecx, dword [esp + 8]
mov dword [edi], ecx
mov al, 1
pop ebx
add esp, 0x258
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test edi, edi
je 0x475e01
mov dword [edi], eax
xor edx, edx
cmp eax, 0xffffffff
setne al
pop ebx
add esp, 0x258
ret
xor al, al
pop ebx
add esp, 0x258
ret

Function at 0x476060
Capabilities:
Get file size

Disassembly:
sub esp, 0xc
xor eax, eax
mov dword [esp], eax
mov dword [esp + 4], eax
lea eax, [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp], eax
cmp eax, 0xffffffff
jne 0x476097
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x476094
or eax, 0xffffffff
or edx, 0xffffffff
add esp, 0xc
ret
mov eax, dword [esp]
mov edx, dword [esp + 4]
add esp, 0xc
ret
Function at 0x476480
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x10000
call fcn.00499d50
push esi
push 0x7fff
lea eax, [esp + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
je 0x4764bf
lea edx, [esi + esi + 2]
push edx
lea eax, [esp + 8]
push eax
push edi
call fcn.004968e0
add esp, 0xc
mov eax, esi
pop esi
add esp, 0x10000
ret
xor ecx, ecx
mov word [edi], cx
pop esi
add esp, 0x10000
ret
Function at 0x476dc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
mov esi, dword [esp + 0x20]
push edi
xor edi, edi
mov dword [esp + 0x10], edi
cmp esi, edi
je 0x476de7
push 2
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
jmp 0x476ded
mov ebx, dword [0x4c9500]
cmp ebx, edi
je 0x476f4b
mov eax, ebp
cmp ebp, edi
jge 0x476e02
neg eax
movzx eax, ax
jmp 0x476e30
jne 0x476e09
mov eax, 1
lea ecx, [esp + 0x14]
push ecx
push 0x476d90
push 0xe
push ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], 0x4cb610
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
mov eax, dword [esp + 0x1c]
cmp eax, 0x4cb610
je 0x476f28
push 0xe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
je 0x476f28
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
je 0x476f28
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x476f28
cmp dword [esp + 0x2c], 0xffffffff
jne 0x476e7d
mov edx, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
cmp dword [esp + 0x2c], 0
jne 0x476e90
push 0xb
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [esp + 0x2c], eax
movzx eax, word [edi + 4]
lea esi, [edi + 6]
cmp eax, 1
jle 0x476ed6
lea edx, [esi + 0xe]
lea edi, [eax - 1]
mov al, byte [edx]
mov cl, byte [esi]
cmp al, cl
jbe 0x476eb8
movzx eax, cl
xor ecx, ecx
cmp eax, dword [esp + 0x2c]
setl cl
jmp 0x476ec4
movzx eax, al
xor ecx, ecx
cmp eax, dword [esp + 0x2c]
setge cl
mov eax, ecx
test eax, eax
je 0x476ecc
mov esi, edx
add edx, 0xe
dec edi
jne 0x476ea2
mov ebp, dword [esp + 0x28]
movzx edx, word [esi + 0xc]
push 3
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x476f24
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x476f24
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x476f24
push 0
push 0
push 0
push 0x30000
push 1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push edi
call dword [sym.imp.USER32.dll_CreateIconFromResourceEx]
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x10]
test eax, eax
je 0x476f3c
test edi, edi
je 0x476f3c
mov dword [eax], ebx
jmp 0x476f47
test esi, esi
je 0x476f47
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
jne 0x476f81
test ebp, ebp
jle 0x476f64
lea eax, [ebp - 1]
push eax
push esi
push 0
call dword [sym.imp.SHELL32.dll_ExtractIconW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
xor eax, eax
cmp ebp, 0xffffffff
setge al
dec eax
and eax, ebp
push eax
push esi
push 0
call dword [sym.imp.SHELL32.dll_ExtractIconW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x477ca0
Capabilities:
Write clipboard data

Disassembly:
sub esp, 8
push esi
push 0x4cc1a8
mov esi, ecx
call fcn.00404600
test eax, eax
jne 0x477ccd
push 0x4a2868
push str.Cant_open_clipboard_for_writing.
mov ecx, 0x4cb680
call fcn.0042ece0
pop esi
add esp, 8
ret
push ebx
push ebp
push edi
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov eax, dword [esp + 0x1c]
add eax, esi
mov ebp, esi
add esi, 4
mov dword [esp + 0x10], eax
cmp esi, eax
jbe 0x477d34
xor esi, esi
cmp dword [0x4cc1c0], esi
je 0x477d20
cmp dword [0x4cc1b0], esi
je 0x477d0e
mov edx, dword [0x4cc1a8]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [0x4cc1b0], esi
call dword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x4cc1c0], esi
mov dword [0x4cc1a8], esi
pop edi
pop ebp
pop ebx
mov eax, 1
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x10]
mov ebp, dword [ebp]
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x477ce9
mov ecx, esi
add esi, 4
cmp esi, eax
ja 0x477ce9
mov ebx, dword [ecx]
mov ebp, esi
add esi, ebx
cmp esi, eax
ja 0x477ce9
xor ecx, ecx
test ebx, ebx
sete cl
add ecx, ebx
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x477dab
test ebx, ebx
je 0x477d91
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x477e01
push ebx
push ebp
push eax
call fcn.004968e0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ebp, esi
mov edx, dword [esp + 0x14]
push edi
push edx
call dword [sym.imp.USER32.dll_SetClipboardData]
lea esi, [ebp + 4]
cmp esi, dword [esp + 0x10]
jbe 0x477d30
jmp 0x477ce9
cmp dword [0x4cc1c0], 0
je 0x477de5
cmp dword [0x4cc1b0], 0
je 0x477dd3
mov eax, dword [0x4cc1a8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [0x4cc1b0], 0
call dword [sym.imp.USER32.dll_CloseClipboard]
xor eax, eax
mov dword [0x4cc1c0], eax
mov dword [0x4cc1a8], eax
push 0x4a2868
push str.Out_of_memory.
mov ecx, 0x4cb680
call fcn.0042ece0
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor esi, esi
cmp dword [0x4cc1c0], esi
je 0x477e3f
cmp dword [0x4cc1b0], esi
je 0x477e2d
mov ecx, dword [0x4cc1a8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [0x4cc1b0], esi
call dword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x4cc1c0], esi
mov dword [0x4cc1a8], esi
push 0x4a2868
push 0x4a2bac
mov ecx, 0x4cb680
call fcn.0042ece0
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
Function at 0x478230
Capabilities:
Query environment variable

Disassembly:
push ecx
push ebx
push esi
mov esi, ecx
movzx eax, byte [esi + 0x17]
push edi
cmp eax, 3
ja case.default.0x478243
jmp dword [eax*4 + 0x478400]
mov eax, esi
call fcn.00401160
cmp dword [0x4c9670], 0
jne 0x47830f
cmp dword [esi + 0xc], 0
jne 0x47830f
mov edi, dword [esp + 0x14]
cmp dword [0x4ccbc0], esi
jne 0x478278
test edi, edi
jne 0x4782d5
mov ecx, dword [esi + 0x18]
push 0
lea eax, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4782d1
mov dword [0x4ccbc0], 0
test edi, edi
je 0x4782c9
mov eax, dword [0x4c964c]
test eax, eax
je 0x4782ba
mov edx, dword [esi + 0x18]
push edx
push str.An_environment_variable_is_being_accessed__see_NoEnv.
push eax
push 0x4cb680
xor ecx, ecx
call fcn.0042f160
mov ecx, dword [esi + 0x18]
call fcn.00476480
pop edi
pop esi
pop ebx
pop ecx
ret 4
dec eax
pop edi
pop esi
pop ebx
pop ecx
ret 4
test edi, edi
je 0x478300
cmp byte [esi + 0x17], 0
jne 0x4782e0
mov eax, dword [esi + 0xc]
jmp 0x4782e2
mov eax, esi
test byte [eax + 0x15], 4
je 0x4782ef
mov eax, esi
call fcn.0042f290
xor eax, eax
mov word [edi], ax
mov dword [0x4ccbc0], eax
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov dword [0x4ccbc0], esi
xor eax, eax
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov eax, dword [esi + 0xc]
mov edi, dword [esp + 0x14]
mov ebx, eax
shr ebx, 1
test edi, edi
je 0x478390
test eax, eax
jne 0x478347
movzx eax, byte [esi + 0x17]
neg eax
sbb eax, eax
and eax, esi
test byte [eax + 0x15], 4
je 0x478339
mov eax, esi
call fcn.0042f290
xor ecx, ecx
mov word [edi], cx
xor eax, eax
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov ecx, dword [esi + 8]
cmp edi, ecx
je 0x478390
cmp eax, 0x186a0
jae 0x47837f
movzx eax, word [ecx]
test ax, ax
je 0x478371
lea ecx, [ecx]
add ecx, 2
mov word [edi], ax
movzx eax, word [ecx]
add edi, 2
test ax, ax
jne 0x478360
xor edx, edx
mov word [edi], dx
mov eax, ebx
pop edi
pop esi
pop ebx
pop ecx
ret 4
push eax
push ecx
push edi
call fcn.004968e0
add esp, 0xc
xor eax, eax
mov word [edi + ebx*2], ax
mov eax, ebx
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0xc]
call fcn.00478230
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov esi, dword [esp + 0x14]
mov ecx, esi
call fcn.00404050
cmp eax, 0xffffffff
jne 0x4783bf
xor eax, eax
test esi, esi
je 0x4783f7
xor edx, edx
mov word [esi + eax*2], dx
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4783dd
xor ecx, ecx
mov word [eax], cx
xor eax, eax
pop edi
pop esi
pop ebx
pop ecx
ret 4
mov edx, dword [esi + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x10]
push edx
push eax
call ecx
add esp, 8
pop edi
pop esi
pop ebx
pop ecx
ret 4