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

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x100a36f4]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x1006a22a
xor eax, eax
jmp 0x1006a3b3
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x100b2f40]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x1006a266
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.1006b4c5
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x1006a341
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x1006a37f
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x1006a2ca
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x1006a2bb
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x1006a29b
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1006a30a
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x1006a313
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x1006a28c
jmp 0x1006a315
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x1006a3ae
cmp dword [ebp - 0x6c], edi
je 0x1006a37f
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x1006a374
call fcn.1005edd0
mov dword [eax], 9
call fcn.1005edd9
mov dword [eax], esi
jmp 0x1006a3a9
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1006a369
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x1006a315
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x1006a315
push dword [ebp - 0x6c]
call fcn.1005ede2
pop ecx
jmp 0x1006a3a9
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x1006a397
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x1006a397
xor eax, eax
jmp 0x1006a3b1
call fcn.1005edd0
mov dword [eax], 0x1c
call fcn.1005edd9
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x1006a3b1
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.10065499
add ebp, 0x3a0
leave
ret
Function at 0x1006a52e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x1006a702
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x100b2f40]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x1006a702
test cl, 0x48
je 0x1006a599
cmp byte [eax + 5], 0xa
je 0x1006a599
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006a5eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1006a5d3
call fcn.1005edd0
mov dword [eax], 9
call fcn.1005edd9
mov dword [eax], esi
jmp 0x1006a5e3
cmp eax, 0x6d
je 0x1006a702
push eax
call fcn.1005ede2
pop ecx
or eax, 0xffffffff
jmp 0x1006a704
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x1006a6fd
test eax, eax
je 0x1006a612
cmp byte [ebx], 0xa
jne 0x1006a612
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x1006a61b
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x1006a6f7
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x1006a6e7
cmp al, 0xd
je 0x1006a64d
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x1006a6d9
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x1006a667
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x1006a662
add dword [ebp + 0x10], 2
jmp 0x1006a6bb
mov dword [ebp + 0x10], eax
jmp 0x1006a6d5
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1006a68f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1006a6d5
cmp dword [ebp - 0xc], 0
je 0x1006a6d5
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x1006a6b0
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x1006a6bb
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x1006a6d8
cmp ebx, dword [ebp + 0xc]
jne 0x1006a6c0
cmp byte [ebp - 1], 0xa
jne 0x1006a6c0
mov byte [ebx], 0xa
jmp 0x1006a6d8
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1006a9b8
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x1006a6d9
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x1006a631
jmp 0x1006a6f7
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x1006a6f7
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x1006a704
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1006ffec
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x10070024
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.1006e0a3
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.1006e07b
jmp 0x10070030
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x100716e1
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 0x10071723
call fcn.100771f3
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x10071723
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x1007171a
xor eax, eax
jmp 0x1007172b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.10071731
pop edi
pop esi
pop ebx
ret 4
Function at 0x401880
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
xor edx, edx
push ebp
push 0x401936
push dword fs:[edx]
mov dword fs:[edx], esp
push 0x40a5c4
call sub.KERNEL32.DLL_GetVersionExA
cmp byte [0x40a045], 0
je 0x4018ae
push 0x40a5c4
call sub.KERNEL32.DLL_VirtualQuery
mov eax, 0x40a5e4
call fcn.00401244
mov eax, 0x40a5f4
call fcn.00401244
mov eax, 0x40a620
call fcn.00401244
push 0xff8
push 0
call sub.KERNEL32.DLL_GetProcAddress
mov dword [0x40a61c], eax
cmp dword [0x40a61c], 0
je 0x401915
mov eax, 3
mov edx, dword [0x40a61c]
xor ecx, ecx
mov dword [edx + eax*4 - 0xc], ecx
inc eax
cmp eax, 0x401
jne 0x4018eb
mov eax, 0x40a604
mov dword [eax + 4], eax
mov dword [eax], eax
mov dword [0x40a610], eax
mov byte [0x40a5bc], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40193d
cmp byte [0x40a045], 0
je 0x401935
push 0x40a5c4
call sub.KERNEL32.DLL_WinExec
ret

Function at 0x401944
Capabilities:
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
cmp byte [0x40a5bc], 0
je 0x401a21
xor edx, edx
push ebp
push 0x401a1a
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [0x40a045], 0
je 0x401976
push 0x40a5c4
call sub.KERNEL32.DLL_VirtualQuery
mov byte [0x40a5bc], 0
mov eax, dword [0x40a61c]
push eax
call sub.KERNEL32.DLL_GetStdHandle
xor eax, eax
mov dword [0x40a61c], eax
mov ebx, dword [0x40a5e4]
jmp 0x4019a9
push 0x8000
push 0
mov eax, dword [ebx + 8]
push eax
call sub.KERNEL32.DLL_GetThreadLocale
mov ebx, dword [ebx]
cmp ebx, 0x40a5e4
jne 0x401997
mov eax, 0x40a5e4
call fcn.00401244
mov eax, 0x40a5f4
call fcn.00401244
mov eax, 0x40a620
call fcn.00401244
mov eax, dword [0x40a5dc]
test eax, eax
je 0x4019ef
mov edx, dword [eax]
mov dword [0x40a5dc], edx
push eax
call sub.KERNEL32.DLL_GetStdHandle
mov eax, dword [0x40a5dc]
test eax, eax
jne 0x4019d8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x401a21
cmp byte [0x40a045], 0
je 0x401a0f
push 0x40a5c4
call sub.KERNEL32.DLL_WinExec
push 0x40a5c4
call sub.KERNEL32.DLL_WriteFile
ret
pop ebx
pop ebp
ret
Function at 0x401f6c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov ebx, eax
cmp byte [0x40a5bc], 0
jne 0x401f89
call fcn.00401880
test al, al
je 0x401f91
cmp ebx, 0x7ffffff8
jle 0x401f9b
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x4020ef
xor ecx, ecx
push ebp
push 0x4020e8
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x40a045], 0
je 0x401fbc
push 0x40a5c4
call sub.KERNEL32.DLL_VirtualQuery
add ebx, 7
and ebx, 0xfffffffc
cmp ebx, 0xc
jge 0x401fcc
mov ebx, 0xc
cmp ebx, 0x1000
jg 0x40206b
mov eax, ebx
test eax, eax
jns 0x401fe1
add eax, 3
sar eax, 2
mov edx, dword [0x40a61c]
mov edx, dword [edx + eax*4 - 0xc]
test edx, edx
je 0x40206b
mov esi, edx
mov eax, esi
add eax, ebx
and dword [eax], 0xfffffffe
mov eax, dword [edx + 4]
cmp edx, eax
jne 0x40201c
mov eax, ebx
test eax, eax
jns 0x40200b
add eax, 3
sar eax, 2
mov ecx, dword [0x40a61c]
xor edi, edi
mov dword [ecx + eax*4 - 0xc], edi
jmp 0x402042
mov ecx, ebx
test ecx, ecx
jns 0x402025
add ecx, 3
sar ecx, 2
mov edi, dword [0x40a61c]
mov dword [edi + ecx*4 - 0xc], eax
mov ecx, dword [edx]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
mov eax, esi
mov edx, dword [edx + 8]
or edx, 2
mov dword [eax], edx
add eax, 4
mov dword [ebp - 4], eax
inc dword [0x40a5ac]
sub ebx, 4
add dword [0x40a5b0], ebx
call fcn.00403778
jmp 0x4020ef
cmp ebx, dword [0x40a614]
jg 0x4020bd
sub dword [0x40a614], ebx
cmp dword [0x40a614], 0xc
jge 0x40208f
add ebx, dword [0x40a614]
xor eax, eax
mov dword [0x40a614], eax
mov eax, dword [0x40a618]
add dword [0x40a618], ebx
mov edx, ebx
or edx, 2
mov dword [eax], edx
add eax, 4
mov dword [ebp - 4], eax
inc dword [0x40a5ac]
sub ebx, 4
add dword [0x40a5b0], ebx
call fcn.00403778
jmp 0x4020ef
mov eax, ebx
call fcn.00401e78
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4020ef
cmp byte [0x40a045], 0
je 0x4020e7
push 0x40a5c4
call sub.KERNEL32.DLL_WinExec
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret
Function at 0x4020fc
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
mov dword [0x40a5c0], eax
cmp byte [0x40a5bc], 0
jne 0x402134
call fcn.00401880
test al, al
jne 0x402134
mov dword [0x40a5c0], 8
mov dword [ebp - 4], 8
jmp 0x402295
xor ecx, ecx
push ebp
push 0x40228e
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x40a045], 0
je 0x402155
push 0x40a5c4
call sub.KERNEL32.DLL_VirtualQuery
mov esi, ebx
sub esi, 4
mov ebx, dword [esi]
test bl, 2
jne 0x402170
mov dword [0x40a5c0], 9
jmp 0x402265
dec dword [0x40a5ac]
mov eax, ebx
and eax, 0x7ffffffc
sub eax, 4
sub dword [0x40a5b0], eax
test bl, 1
je 0x4021d0
mov eax, esi
sub eax, 0xc
mov edx, dword [eax + 8]
cmp edx, 0xc
jl 0x4021a0
test edx, 0x80000003
je 0x4021af
mov dword [0x40a5c0], 0xa
jmp 0x402265
mov eax, esi
sub eax, edx
cmp edx, dword [eax + 8]
je 0x4021c7
mov dword [0x40a5c0], 0xa
jmp 0x402265
add ebx, edx
mov esi, eax
call fcn.00401a24
and ebx, 0x7ffffffc
mov eax, esi
add eax, ebx
mov edi, eax
cmp edi, dword [0x40a618]
jne 0x402210
sub dword [0x40a618], ebx
add dword [0x40a614], ebx
cmp dword [0x40a614], 0x3c00
jle 0x402201
call fcn.00401d14
xor eax, eax
mov dword [ebp - 4], eax
call fcn.00403778
jmp 0x402295
mov edx, dword [eax]
test dl, 2
je 0x402233
and edx, 0x7ffffffc
cmp edx, 4
jge 0x40222e
mov dword [0x40a5c0], 0xb
jmp 0x402265
or dword [eax], 1
jmp 0x40225c
mov eax, edi
cmp dword [eax + 4], 0
je 0x402246
cmp dword [eax], 0
je 0x402246
cmp dword [eax + 8], 0xc
jge 0x402252
mov dword [0x40a5c0], 0xb
jmp 0x402265
mov edx, dword [eax + 8]
add ebx, edx
call fcn.00401a24
mov edx, ebx
mov eax, esi
call fcn.00401c8c
mov eax, dword [0x40a5c0]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402295
cmp byte [0x40a045], 0
je 0x40228d
push 0x40a5c4
call sub.KERNEL32.DLL_WinExec
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x403af0
Capabilities:
Accept command line arguments

Disassembly:
push ecx
cmp byte [0x40a044], 0
je 0x403b51
cmp word [0x40a218], 0xd7b2
jne 0x403b19
cmp dword [0x40a220], 0
jbe 0x403b19
mov eax, 0x40a214
call dword [0x40a230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x409060
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetCommandLineA
push eax
call sub.KERNEL32.DLL_GetCurrentThreadId
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403b78
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetCommandLineA
push eax
call sub.KERNEL32.DLL_GetCurrentThreadId
pop edx
ret
cmp byte [0x409020], 0
jne 0x403b6d
push 0
push 0x409058
push 0x409060
push 0
call sub.user32.dll_GetSystemMetrics
pop edx
ret
Function at 0x404364
Capabilities:
Get disk size
Get file attributes
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdb0
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
push 0x4044f8
call sub.KERNEL32.DLL_TlsGetValue
mov esi, eax
test esi, esi
je 0x4043cc
push 0x404508
push esi
call sub.KERNEL32.DLL_TlsSetValue
mov ebx, eax
test ebx, ebx
je 0x4043cc
push 0x105
lea eax, [ebp - 0x24f]
push eax
mov eax, dword [ebp - 4]
push eax
call ebx
test eax, eax
je 0x4043cc
mov eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x24f]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
jmp 0x4044ee
mov eax, dword [ebp - 4]
cmp byte [eax], 0x5c
jne 0x40440c
mov eax, dword [ebp - 4]
cmp byte [eax + 1], 0x5c
jne 0x4044ee
mov eax, dword [ebp - 4]
add eax, 2
call fcn.00404350
mov esi, eax
cmp byte [esi], 0
je 0x4044ee
lea eax, [esi + 1]
call fcn.00404350
mov esi, eax
cmp byte [esi], 0
je 0x4044ee
jmp 0x404412
mov esi, dword [ebp - 4]
add esi, 2
mov ebx, esi
sub ebx, dword [ebp - 4]
lea eax, [ebx + 1]
push eax
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x24f]
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
jmp 0x4044d1
lea eax, [esi + 1]
call fcn.00404350
mov edi, eax
mov eax, edi
sub eax, esi
mov edx, eax
add edx, ebx
inc edx
cmp edx, 0x105
jg 0x4044ee
inc eax
push eax
push esi
lea eax, [ebp - 0x24f]
add eax, ebx
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
lea eax, [ebp - 0x14a]
push eax
lea eax, [ebp - 0x24f]
push eax
call sub.KERNEL32.DLL_VirtualFree
mov esi, eax
cmp esi, 0xffffffff
je 0x4044ee
push esi
call sub.KERNEL32.DLL_VirtualAlloc
lea eax, [ebp - 0x11e]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
lea edx, [ebx + 1]
add eax, edx
inc eax
cmp eax, 0x105
jg 0x4044ee
mov byte [ebp + ebx - 0x24f], 0x5c
mov eax, 0x105
sub eax, ebx
dec eax
push eax
lea eax, [ebp - 0x11e]
push eax
lea eax, [ebp - 0x24f]
add eax, ebx
inc eax
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
lea eax, [ebp - 0x11e]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
inc eax
add ebx, eax
mov esi, edi
cmp byte [esi], 0
jne 0x404430
mov eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x24f]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40451c
Capabilities:
Get disk size
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.KERNEL32.DLL_LocalAlloc
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40474c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40459f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40474c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40459f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404768
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404628
xor eax, eax
push ebp
push 0x404621
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00404364
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.user32.dll_GetKeyboardType
test eax, eax
je 0x404606
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404788
mov eax, dword [ebp - 8]
push eax
call sub.user32.dll_GetKeyboardType
test eax, eax
je 0x404606
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404628
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.KERNEL32.DLL_GetACP
push eax
call sub.KERNEL32.DLL_DeleteCriticalSection
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x404742
cmp byte [ebp - 0xd], 0
jne 0x40466f
cmp byte [ebp - 0x12], 0
je 0x404742
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404688
dec ebx
cmp byte [ebx], 0x2e
je 0x404697
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404687
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x404742
inc ebx
cmp byte [ebp - 0x12], 0
je 0x4046d4
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_GetCPInfo
mov esi, eax
test esi, esi
jne 0x404742
cmp byte [ebp - 0xd], 0
je 0x404742
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_GetCPInfo
mov esi, eax
test esi, esi
jne 0x404742
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_GetDiskFreeSpaceA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_GetCPInfo
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406128
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40614d
mov dword [0x40a0f4], eax
add esp, 0xfffffff8
push 0x4060ec
push eax
call fcn.00407c20
jmp 0x406152
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x406168
mov dword [0x409054], 0x40624c
jmp 0x406172
mov dword [0x409054], 0x406200
leave
ret

Function at 0x41e990
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1b000]
push edi
or ebp, 0xffffffff
jmp 0x41e9b2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x41e9b9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x41e9a8
mov eax, 1
add ebx, ebx
jne 0x41e9cb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x41e9c0
jne 0x41e9dc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x41e9c0
xor ecx, ecx
sub eax, 3
jb 0x41e9f0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x41ea62
mov ebp, eax
add ebx, ebx
jne 0x41e9fb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x41ea08
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x41ea2c
inc ecx
add ebx, ebx
jne 0x41ea18
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x41ea0d
jne 0x41ea29
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x41ea0d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x41ea4c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x41ea3d
jmp 0x41e9ae
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x41ea4c
add edi, ecx
jmp 0x41e9ae
pop esi
mov edi, esi
mov ecx, 0x12
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x41ea6a
cmp byte [edi], 2
jne 0x41ea6a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x41ea6f
lea edi, [esi + 0x1c000]
mov eax, dword [edi]
or eax, eax
je 0x41eae7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x1ebb0]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1ebec]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x41ea9c
mov ecx, edi
jns 0x41eacb
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1ebf0]
or eax, eax
je 0x41eae1
mov dword [ebx], eax
add ebx, 4
jmp 0x41eab9
call dword [esi + 0x1ec00]
mov ebp, dword [esi + 0x1ebf4]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1d7]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x41eb1b
sub esp, 0xffffff80
jmp 0x401230