joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4301c0
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, ecx
call fcn.0042a970
test eax, eax
je 0x4302af
mov ecx, edi
call fcn.0042a970
mov ecx, eax
call fcn.00428000
test eax, eax
jne 0x4302af
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x4302af
mov eax, dword [0x49fa20]
and eax, 0xffff
push eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov esi, eax
test esi, esi
jne 0x430222
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
lea ecx, [esp + 0x10]
mov ebp, dword [esp + 0x24]
push 1
push ecx
mov ecx, dword [edi + 0x44]
lea edx, [esp + 0x1c]
shr ecx, 4
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x2c]
and ecx, 1
push eax
push ecx
push ebp
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
mov ecx, edi
call fcn.0042a970
mov ecx, eax
call fcn.00428230
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [esp + 0x28]
mov eax, 1
cmp ecx, eax
jne 0x4302af
cmp ebx, eax
jne 0x4302af
cmp dword [esp + 0x10], eax
jne 0x430295
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xcc]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [edi]
push eax
mov eax, dword [esp + 0x24]
push ecx
push ebp
push eax
mov ecx, edi
call dword [edx + 0xc0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
Function at 0x432eb0
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46ea98
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x30]
push esi
mov ebx, ecx
push edi
mov esi, dword [ebp]
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
dec ecx
cmp eax, ecx
jge 0x432ee9
inc eax
mov dword [esi + 0x10], eax
jmp 0x432ffc
mov eax, dword [ebx + 0x3c]
mov ecx, dword [esi + 8]
cmp ecx, eax
jne 0x432efd
mov eax, 0xffffffc7
jmp 0x432ffe
mov esi, dword [esi]
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jl 0x432f0e
cmp dword [esi + 8], eax
jne 0x432efd
cmp dword [esi + 8], eax
jne 0x432f27
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jl 0x432f27
mov eax, 0xffffffc7
jmp 0x432ffe
mov eax, dword [esi + 4]
xor edi, edi
cmp eax, edi
je 0x432f3b
push eax
mov ecx, ebx
call fcn.004326e0
mov dword [esi + 4], edi
mov dword [ebp], esi
mov ecx, dword [esi + 0x10]
inc ecx
mov dword [esi + 0x10], ecx
lea ecx, [esp + 0x10]
call fcn.00403d50
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x3c]
test edi, edi
jne 0x432f6c
mov ecx, dword [ebx + 4]
mov edx, dword [ecx + 8]
lea ecx, [esp + 0x10]
push edx
call fcn.00403d70
mov edi, eax
mov eax, dword [esi + 8]
push edi
push eax
mov ecx, ebx
call fcn.00431e50
test eax, eax
mov dword [esp + 0x38], eax
je 0x432f9f
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x10], 0x4735d8
call fcn.00403f50
mov eax, dword [esp + 0x38]
jmp 0x432ffe
mov ecx, dword [esi + 0x10]
push ecx
push edi
mov ecx, ebx
call fcn.00432d10
mov dl, byte [edi]
and dl, 1
cmp dl, 1
jne 0x432fe3
mov ecx, dword [esp + 0x34]
push ebp
push ecx
push edi
push eax
mov ecx, ebx
call fcn.00432d30
mov esi, eax
test esi, esi
jne 0x433013
mov edx, dword [ebp]
push eax
push edi
mov ecx, ebx
mov dword [edx + 0x10], eax
call fcn.00432d10
mov cl, byte [edi]
and cl, 1
cmp cl, 1
je 0x432fb5
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x10], 0x4735d8
call fcn.00403f50
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
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x10], 0x4735d8
call fcn.00403f50
mov eax, esi
jmp 0x432ffe

Function at 0x436130
Capabilities:
Create thread

Disassembly:
push ecx
cmp dword [ecx + 0xcc], 1
je 0x436190
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x436190
mov eax, dword [ecx + 0xb0]
test eax, eax
je 0x436190
push esi
mov edx, 5
mov esi, dword [ecx + 0xbc]
cmp esi, edx
pop esi
je 0x436190
mov dword [ecx + 0xb4], eax
mov dword [ecx + 0x94], 0
mov dword [ecx + 0xbc], edx
lea eax, [esp]
push eax
push 0
push ecx
push 0x4361d0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
ret
Function at 0x43c300
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46efe8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.00469304
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.0043bca0
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00469232
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.00465af0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.00465af0
push 1
push 0
push 0
mov ecx, esi
call fcn.00465a98
push 1
push 0
push 1
mov ecx, esi
call fcn.00465a98
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.00469376
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x43c480
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46efe8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.00469304
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.0043bca0
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.00469232
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x43c544
cmp dword [esp + 0x40], 1
jne 0x43c542
cmp ecx, eax
jge 0x43c544
mov eax, ecx
cmp eax, 0xc8
jge 0x43c550
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.0043c300
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.00469376
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x43ccd0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46f8d3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.00463f10
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.004695ac
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.0046aac8
test eax, eax
je 0x43cdec
mov ecx, dword [esp + 0x3c]
call fcn.004695d9
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x43cdb0
push edi
mov ecx, esi
call fcn.00466c37
mov ecx, esi
call fcn.0043cf50
cmp dword [esp + 0x38], 1
jne 0x43cde5
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.00466d72
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x43f820
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x43f853
push esi
call fcn.00442910
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x43f84c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x43f8d9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x43f8c2
mov eax, dword [esi + 8]
test eax, eax
je 0x43f877
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x43f8be
cmp eax, 2
je 0x43f8c2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x43f86a
cmp eax, 3
je 0x43f89d
cmp eax, 1
jne 0x43f86a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x43f86a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x43f86a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0043f900
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x43f8e8
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.0043f900
add esp, 4
pop esi
ret

Function at 0x4568b4
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4926a4]
jne 0x4568be
repz ret
jmp fcn.0045d8f5
Function at 0x45c9cc
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4926a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00451cab
and dword [ebp - 0x14], 0
cmp dword [0x4a5560], 0
mov dword [ebp - 0x18], eax
jne 0x45ca7f
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x45cb27
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x45cb27
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x47ded0
push ebx
mov dword [0x4a5560], eax
call edi
push eax
call esi
push 0x47debc
push ebx
mov dword [0x4a5564], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x4a5568], eax
call edi
push eax
call esi
mov dword [0x4a5570], eax
test eax, eax
je 0x45ca7f
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4a556c], eax
mov eax, dword [0x4a556c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x45cad8
cmp dword [0x4a5570], ecx
je 0x45cad8
push eax
call esi
push dword [0x4a5570]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x45cad8
test ebx, ebx
je 0x45cad8
call edi
test eax, eax
je 0x45cacf
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x45cacf
test byte [ebp - 8], 1
jne 0x45cad8
or dword [ebp + 0x10], 0x200000
jmp 0x45cb0b
mov eax, dword [0x4a5564]
cmp eax, dword [ebp - 0x18]
je 0x45cb0b
push eax
call esi
test eax, eax
je 0x45cb0b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x45cb0b
mov eax, dword [0x4a5568]
cmp eax, dword [ebp - 0x18]
je 0x45cb0b
push eax
call esi
test eax, eax
je 0x45cb0b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4a5560]
call esi
test eax, eax
je 0x45cb27
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x45cb29
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004568b4
leave
ret

Function at 0x464d06
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x464d3e
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00462dbd
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00462d95
jmp 0x464d4a
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4
Function at 0x4663f4
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x466436
call fcn.0046beb3
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x466436
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x46642d
xor eax, eax
jmp 0x46643e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00466444
pop edi
pop esi
pop ebx
ret 4
Function at 0x401000
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
mov eax, dword [0x41d064]
shl eax, 2
mov dword [0x41d068], eax
push edi
push ecx
xor eax, eax
mov edi, 0x422fa4
mov ecx, 0x426a00
cmp ecx, edi
jbe 0x401024
sub ecx, edi
cld
rep stosb byte es:[edi], al
pop ecx
pop edi
push 0
call fcn.0040dc18
pop ecx
push 0x41d02c
push 0
call sub.KERNEL32.dll_GetModuleHandleA
mov dword [0x41d06c], eax
push 0
jmp fcn.0041b2f0
Function at 0x4073c1
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x130
mov eax, dword [0x421fdf]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
mov eax, dword [0x421f8f]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [esp + 0x14]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp byte [esp + 0x14], 0
je 0x407417
xor eax, eax
movsx edx, byte [esp + eax + 0x14]
mov word [esi + eax*2], dx
inc eax
cmp byte [esp + eax + 0x14], 0
jne 0x407406
xor eax, eax
xor edx, edx
jmp 0x40741e
inc eax
movzx ecx, word [esi + eax*2]
cmp ecx, 0x5c
cmove edx, eax
test ecx, ecx
jne 0x40741d
lea ecx, [esi + edx*2]
mov edx, dword [0x421fb3]
cmp dword [edx], 0
je 0x40748d
movzx esi, word [ecx + 2]
xor eax, eax
test esi, esi
je 0x40751c
inc eax
movzx edi, word [ecx + eax*2 + 2]
test edi, edi
jne 0x407448
movzx eax, al
cmp al, byte [edx]
je 0x40746a
cmp al, byte [edx + 1]
jne 0x40750d
test esi, esi
je 0x407515
xor esi, esi
xor eax, eax
movzx edi, word [ecx + eax*2 + 2]
inc eax
add esi, edi
movzx edi, word [ecx + eax*2 + 2]
test edi, edi
jne 0x40746e
cmp esi, dword [edx + 4]
je 0x40748d
cmp esi, dword [edx + 8]
jne 0x40750d
mov eax, dword [0x421f8f]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [esp + 0xc], edi
mov eax, dword [0x421f9f]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov eax, dword [0x421fdb]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x118], eax
mov eax, dword [0x421fcf]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor esi, esi
jmp 0x40747f
cmp byte [edx], 0
jne 0x407459
jmp 0x407515
Function at 0x40af70
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
mov eax, dword [ebp + 8]
mov byte [eax], 0x5c
push 0
lea edx, [ebp - 0x10c]
push edx
call fcn.0040ad4d
add esp, 8
push dword [ebp + 0xc]
lea ecx, [ebp - 0x10c]
push ecx
call fcn.0040ae25
add esp, 8
test eax, eax
je 0x40afaf
push dword [ebp + 0xc]
call fcn.0040ae90
pop ecx
push dword [ebp + 8]
push pe_nt_image_headers32
call sub.KERNEL32.dll_GetCurrentDirectoryA
push dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
call fcn.0040ae25
add esp, 8
test eax, eax
je 0x40afdf
lea edx, [ebp - 0x10c]
push edx
call fcn.0040ae90
pop ecx
push 0x5c
push dword [ebp + 8]
call fcn.0040d499
add esp, 8
mov dword [ebp - 4], eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0040d398
add esp, 8
push dword [ebp + 8]
call fcn.0040b102
pop ecx
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x100], 1
jle 0x40b028
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x100]
inc dword [eax + 0x100]
mov ecx, dword [ebp + 8]
mov byte [ecx + edx], 0x5c
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x100]
mov ecx, dword [ebp + 8]
mov byte [ecx + edx], 0
mov esp, ebp
pop ebp
ret
Function at 0x4106bc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
call fcn.00411e14
test byte [ebp + 0xd], 0xc0
jne 0x4106e0
mov eax, dword [0x4207ec]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x4106ed
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x41071a
je 0x41072c
sub ecx, 0x100
je 0x41073a
sub ecx, 0x100
je 0x410741
sub ecx, 0x100
je 0x410733
jmp 0x410748
sub ecx, 0x600
je 0x410741
sub ecx, 0x100
je 0x41072c
jmp 0x410748
mov edi, 1
jmp 0x41074d
mov edi, 2
jmp 0x41074d
mov edi, 4
jmp 0x41074d
mov edi, 5
jmp 0x41074d
mov edi, 3
test byte [ebp + 0xd], 1
je 0x410774
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x42024c]
test al, 0x80
je 0x41076d
mov ebx, 0x80
jmp 0x410786
mov ebx, 1
jmp 0x410786
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x410786
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x410798
je 0x4107a1
dec eax
je 0x4107aa
jmp 0x4107b3
mov dword [ebp - 4], 0x80000000
jmp 0x4107c2
mov dword [ebp - 4], 0x40000000
jmp 0x4107c2
mov dword [ebp - 4], 0xc0000000
jmp 0x4107c2
push 1
call fcn.004121d4
pop ecx
mov ebx, eax
jmp 0x4108ae
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x4107de
sub eax, 0x10
je 0x4107e5
sub eax, 0x10
je 0x4107ee
sub eax, 0x10
je 0x4107f7
jmp 0x4107f7
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x4107fe
mov dword [ebp - 8], 1
jmp 0x4107fe
mov dword [ebp - 8], 2
jmp 0x4107fe
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.dll_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x410867
call sub.KERNEL32.dll_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x41085c
test byte [ebp + 0xd], 1
mov ebx, 0x50
jne 0x41085c
add ebx, 0xffffffb2
push ebx
call fcn.004121d4
pop ecx
mov ebx, eax
jmp 0x4108ae
mov edi, esi
push edi
call fcn.00410620
pop ecx
test eax, eax
je 0x41087b
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x410887
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.00411f14
add esp, 8
mov ebx, eax
inc eax
jne 0x4108ae
push 4
call fcn.004121d4
pop ecx
push esi
call sub.KERNEL32.dll_CloseHandle
call fcn.00411e48
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410df8
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef8
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
dec eax
je 0x410e14
call fcn.00412240
jmp 0x410e83
lea edx, [ebp - 0x108]
push edx
push 0x104
call sub.KERNEL32.dll_GetCurrentDirectoryA
test eax, eax
jne 0x410e30
call fcn.00412240
jmp 0x410e83
cmp dword [0x423804], 1
je 0x410e81
movsx ecx, byte [ebp - 0x108]
push ecx
call fcn.00418f9c
pop ecx
cmp al, 0x41
jl 0x410e81
cmp al, 0x5a
jg 0x410e81
cmp byte [ebp - 0x107], 0x3a
jne 0x410e81
mov byte [ebp - 4], 0x3d
mov byte [ebp - 3], al
lea eax, [ebp - 0x108]
mov byte [ebp - 2], 0x3a
mov byte [ebp - 1], 0
push eax
lea edx, [ebp - 4]
push edx
call sub.KERNEL32.dll_SetEnvironmentVariableA
dec eax
je 0x410e81
call fcn.00412240
jmp 0x410e83
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x410e88
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
mov al, byte [ebp + 8]
lea edx, [ebp - 3]
add al, 0x40
mov byte [ebp - 3], al
mov byte [ebp - 2], 0x3a
mov byte [ebp - 1], 0
push edx
call sub.KERNEL32.dll_SetCurrentDirectoryA
dec eax
je 0x410eb0
call fcn.00412240
pop ecx
pop ebp
ret
xor eax, eax
pop ecx
pop ebp
ret

Function at 0x410f2c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
lea eax, [ebp - 0x104]
push eax
push 0x104
call sub.KERNEL32.dll_GetCurrentDirectoryA
cmp byte [ebp - 0x104], 0x61
jl 0x410f5b
movsx edx, byte [ebp - 0x104]
add edx, 0xffffffa0
jmp 0x410f65
movsx edx, byte [ebp - 0x104]
add edx, 0xffffffc0
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov esp, ebp
pop ebp
ret

Function at 0x410f70
Capabilities:
Get disk information
Query environment variable
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef8
xor eax, eax
lea ecx, [ebp - 4]
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
lea edi, [ebp - 0x108]
mov dword [esi], eax
mov byte [ebp - 4], 0x3d
mov dl, byte [ebp + 8]
add dl, 0x40
mov byte [ebp - 3], dl
mov byte [ebp - 2], 0x3a
mov byte [ebp - 1], 0
push 0x104
push edi
push ecx
call sub.KERNEL32.dll_GetEnvironmentVariableA
test eax, eax
jne 0x410fd6
mov al, byte [ebp - 3]
mov byte [edi], al
mov byte [edi + 1], 0x3a
mov byte [edi + 2], 0x5c
mov byte [edi + 3], 0
push edi
lea edx, [ebp - 4]
push edx
call sub.KERNEL32.dll_SetEnvironmentVariableA
dec eax
je 0x410fd6
call fcn.00412240
jmp 0x411011
push edi
call sub.KERNEL32.dll_SetCurrentDirectoryA
dec eax
je 0x410fe6
call fcn.00412240
jmp 0x411011
mov byte [edi + 1], 0x3a
mov byte [edi + 2], 0x5c
mov byte [edi + 3], 0
mov byte [edi], 0x41
jmp 0x41100c
push edi
call sub.KERNEL32.dll_GetDriveTypeA
mov ebx, eax
test eax, eax
je 0x41100a
cmp ebx, 1
je 0x41100a
inc dword [esi]
inc byte [edi]
cmp byte [edi], 0x5a
jle 0x410ff7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret