joyce8/EMBER2024-capa huggingface dataset:
Function at 0x416f80
Capabilities:
Check mutex on windows

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x41700a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
cmp eax, 0x102
ja 0x416ff0
je 0x416fc7
test eax, eax
je 0x416fba
cmp eax, 0x80
jne 0x416ff5
mov ecx, dword [esp + 0x14]
mov al, 1
mov dword [ecx], esi
pop esi
pop ebx
ret 0xc
mov eax, dword [esp + 0x10]
test eax, eax
je 0x416fe7
push 0
push eax
push 0
push 0
call dword [sym.imp.USER32.dll_FindWindowExA]
test eax, eax
je 0x416fe7
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0x102
call ebx
jmp 0x416ff6
cmp eax, 0xffffffff
je 0x416ff6
int3
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call ebx
pop edi
mov edx, dword [esp + 0x14]
pop esi
xor al, al
pop ebx
mov dword [edx], 0
ret 0xc

Function at 0x4180c0
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x1000
call fcn.00426190
mov ecx, dword [esp + 0x1004]
lea eax, [esp + 0x1008]
push eax
push ecx
lea edx, [esp + 8]
push 0x1000
push edx
call fcn.004261bf
add esp, 0x10
mov byte [esp + 0xfff], 0
test eax, eax
jle 0x41810a
cmp eax, 0x1000
jae 0x41810a
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x1000
ret

Function at 0x418120
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push ebx
push ecx
push esi
push edi
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41815a
mov ebx, dword [ebp + 0xc]
mov esi, 0x432230
add ecx, ebx
not eax
movzx edi, byte ds:[ebx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword ds:[esi + edi*4]
inc ebx
cmp ebx, ecx
jne 0x418140
not eax
pop edi
pop esi
pop ecx
pop ebx
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x41a410
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
xor ecx, ecx
mov edx, dword [esp + 0x64]
mov dword [esp + 0x18], ecx
xor eax, eax
mov dword [esp + 0x1c], ecx
push ebx
mov dword [esp + 0x24], ecx
push ebp
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x14], eax
mov word [esp + 0x30], cx
push esi
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x18], edx
lea ecx, [esp + 0x10]
push edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x78]
lea edx, [esp + 0x18]
xor edi, edi
push ecx
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], eax
call fcn.00419e40
test eax, eax
js 0x41a64d
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x28]
push 0x16
push ecx
push edx
push esi
call fcn.00418490
test al, al
je 0x41a648
cmp dword [esp + 0x10], 0x16
jne 0x41a648
mov ax, word [esp + 0x28]
cmp ax, word [esp + 0x2a]
jne 0x41a5fa
mov cx, word [esp + 0x2c]
cmp cx, word [esp + 0x2e]
jne 0x41a5fa
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
cmp ebp, edi
jne 0x41a4e0
pop edi
pop esi
pop ebp
mov eax, 0x20000000
pop ebx
add esp, 0x5c
ret 0xc
mov esi, dword [esp + 0x70]
xor edi, edi
mov dword [esp + 0x3c], edi
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
cmp ebp, 0x2e
stosw word es:[edi], ax
jb 0x41a633
lea edx, [esp + 0x10]
lea eax, [esp + 0x3c]
push edx
push 0x2e
push eax
push ebx
push esi
call fcn.00418490
test al, al
je 0x41a648
cmp dword [esp + 0x10], 0x2e
jne 0x41a648
mov cl, byte [esp + 0x42]
sub ebp, 0x2e
and ecx, 0xff
cmp ecx, 0x20
ja 0x41a5fa
mov ecx, dword [esp + 0x58]
mov eax, ecx
and eax, 0xffff
cmp ebp, eax
jb 0x41a633
test cx, cx
je 0x41a609
inc eax
push eax
call fcn.0041db00
mov esi, eax
test esi, esi
je 0x41a618
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x70]
lea edx, [esp + 0x10]
and eax, 0xffff
push edx
push eax
push esi
push ecx
call fcn.00418450
test al, al
je 0x41a642
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x10]
and eax, 0xffff
cmp eax, ecx
jne 0x41a642
lea edx, [esp + 0x3c]
lea ebx, [ebx + eax + 0x2e]
sub ebp, eax
mov byte [eax + esi], 0
push edx
lea eax, [esp + 0x1c]
push esi
push eax
call fcn.0041a210
push esi
mov edi, eax
call fcn.0041dfb0
test edi, edi
js 0x41a627
mov ecx, dword [esp + 0x5a]
and ecx, 0xffff
cmp ebp, ecx
jb 0x41a633
mov eax, dword [esp + 0x5c]
sub ebp, ecx
and eax, 0xffff
cmp ebp, eax
jb 0x41a633
add ecx, eax
add ebx, ecx
sub ebp, eax
jne 0x41a4da
pop edi
pop esi
pop ebp
mov eax, 0x20000000
pop ebx
add esp, 0x5c
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0xa0000009
pop ebx
add esp, 0x5c
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0xa0000007
pop ebx
add esp, 0x5c
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0xa000000a
pop ebx
add esp, 0x5c
ret 0xc
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0xa0000002
pop ebx
add esp, 0x5c
ret 0xc
push esi
call fcn.0041dfb0
mov eax, 0xa0000003
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0xc
Function at 0x41a950
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x14]
push esi
push edi
mov edi, 8
mov ecx, dword [eax]
mov edx, dword [eax + 4]
xor eax, eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
xor esi, esi
mov dl, byte [esp + esi + 8]
mov al, 1
mov ecx, esi
shl al, cl
test dl, 0x40
je 0x41a98a
or byte [esp + 0x10], al
test dl, 0x10
je 0x41a993
or byte [esp + 0x11], al
test dl, 4
je 0x41a99c
or byte [esp + 0x12], al
test dl, 1
je 0x41a9a5
or byte [esp + 0x13], al
test dl, dl
jns 0x41a9ad
or byte [esp + 0x14], al
test dl, 0x20
je 0x41a9b6
or byte [esp + 0x15], al
test dl, 8
je 0x41a9bf
or byte [esp + 0x16], al
test dl, 2
je 0x41a9c8
or byte [esp + 0x17], al
inc esi
dec edi
jne 0x41a977
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
push ebx
xor bl, bl
push ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov byte [esp + 0x18], bl
and edi, 1
mov eax, dword [esp + 0x18]
and eax, 0xff
lea ecx, [eax + eax*2]
lea eax, [esp + 0x10]
lea edx, [ebp + ecx*2]
lea ecx, [esp + 0x2c]
push edx
push eax
push ecx
call fcn.0041aac0
mov eax, dword [esp + 0x2c]
xor eax, esi
mov esi, dword [esp + 0x10]
test edi, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], eax
jne 0x41aa2c
inc bl
cmp bl, 0x10
mov byte [esp + 0x18], bl
jb 0x41a9eb
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], esi
pop ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
xor esi, esi
mov edi, 8
pop ebx
mov cl, byte [esp + esi + 8]
mov al, byte [esi + 0x4327e0]
test cl, 1
je 0x41aa5a
or byte [esp + 0x10], al
test cl, 2
je 0x41aa63
or byte [esp + 0x11], al
test cl, 4
je 0x41aa6c
or byte [esp + 0x12], al
test cl, 8
je 0x41aa75
or byte [esp + 0x13], al
test cl, 0x10
je 0x41aa7e
or byte [esp + 0x14], al
test cl, 0x20
je 0x41aa87
or byte [esp + 0x15], al
test cl, 0x40
je 0x41aa90
or byte [esp + 0x16], al
test cl, cl
jns 0x41aa98
or byte [esp + 0x17], al
inc esi
dec edi
jne 0x41aa47
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
pop edi
mov dword [eax], edx
mov dword [eax + 4], ecx
pop esi
add esp, 0x10
ret 0xc
Function at 0x41b340
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x10
test al, 1
je 0x41b361
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x1c]
push eax
push ecx
call fcn.0041a950
add esp, 0x10
ret 0xc
mov eax, dword [esp + 0x14]
push esi
push edi
mov edi, 8
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
xor esi, esi
mov dl, byte [esp + esi + 0x10]
mov al, 1
mov ecx, esi
shl al, cl
test dl, 0x40
je 0x41b398
or byte [esp + 8], al
test dl, 0x10
je 0x41b3a1
or byte [esp + 9], al
test dl, 4
je 0x41b3aa
or byte [esp + 0xa], al
test dl, 1
je 0x41b3b3
or byte [esp + 0xb], al
test dl, dl
jns 0x41b3bb
or byte [esp + 0xc], al
test dl, 0x20
je 0x41b3c4
or byte [esp + 0xd], al
test dl, 8
je 0x41b3cd
or byte [esp + 0xe], al
test dl, 2
je 0x41b3d6
or byte [esp + 0xf], al
inc esi
dec edi
jne 0x41b385
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 8]
push ebx
push ebp
mov dword [esp + 0x2c], edi
lea ebx, [ecx + 0x5a]
mov ebp, 0x10
lea edx, [esp + 0x2c]
push ebx
lea eax, [esp + 0x2c]
push edx
push eax
call fcn.0041aac0
sub ebx, 6
mov eax, dword [esp + 0x28]
xor eax, esi
mov esi, edi
mov edi, eax
dec ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
jne 0x41b3f4
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x1c], esi
pop ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
xor esi, esi
mov edi, 8
pop ebx
mov cl, byte [esp + esi + 0x10]
mov al, byte [esi + 0x4327e0]
test cl, 1
je 0x41b44a
or byte [esp + 8], al
test cl, 2
je 0x41b453
or byte [esp + 9], al
test cl, 4
je 0x41b45c
or byte [esp + 0xa], al
test cl, 8
je 0x41b465
or byte [esp + 0xb], al
test cl, 0x10
je 0x41b46e
or byte [esp + 0xc], al
test cl, 0x20
je 0x41b477
or byte [esp + 0xd], al
test cl, 0x40
je 0x41b480
or byte [esp + 0xe], al
test cl, cl
jns 0x41b488
or byte [esp + 0xf], al
inc esi
dec edi
jne 0x41b437
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
pop edi
mov dword [eax], ecx
mov dword [eax + 4], edx
pop esi
add esp, 0x10
ret 0xc

Function at 0x41b750
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
push esi
mov esi, dword [esp + 0x44]
push edi
push 8
push esi
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov edx, eax
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0xc]
mov dword [esp + 8], 0x3c
rep stosd dword es:[edi], eax
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x41b7ba
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0
mov eax, dword [edx + 0x1c]
push 0
push 0x69
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 1
call fcn.00416e90
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
push 1
push 0x69
push esi
call fcn.00416e90
pop edi
pop esi
add esp, 0x3c
ret 4
Function at 0x41d080
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x50], ecx
mov dword [eax + 0x58], ecx
mov dword [eax + 0x5c], ecx
ret 4

Function at 0x41eae0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push esi
call edi
cmp eax, 0xffffffff
je 0x41eb26
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call ebx
test eax, eax
jne 0x41eb1c
push 0x1f4
call ebp
push esi
call edi
cmp eax, 0xffffffff
jne 0x41eb0e
pop ebp
pop ebx
pop edi
pop esi
ret 4

Function at 0x41eb30
Capabilities:
Check if file exists
Create process on windows
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
sub esp, 0x5e8
lea eax, [esp + 0x158]
push ebx
xor ebx, ebx
push esi
push ebx
push ebx
push 0x104
push eax
push ebx
call fcn.00414bf0
test al, al
je 0x41eccc
mov edx, dword [esp + 0x5f4]
lea ecx, [esp + 0x5c]
push ebx
push ecx
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x41eccc
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41eccc
push edi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], 0x44
lea edx, [esp + 0x268]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x164]
push ecx
push str._s.tmp
push 0x104
push edx
call fcn.00409970
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
add esp, 0x10
lea eax, [esp + 0x164]
push 0x80
push eax
call esi
lea ecx, [esp + 0x60]
push 0x80
push ecx
call esi
lea edx, [esp + 0x268]
push 0x80
push edx
call esi
lea eax, [esp + 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileA]
lea ecx, [esp + 0x268]
lea edx, [esp + 0x164]
push ecx
push edx
call esi
test eax, eax
pop edi
je 0x41ec55
lea eax, [esp + 0x160]
lea ecx, [esp + 0x5c]
push eax
push ecx
call esi
test eax, eax
je 0x41ec55
lea edx, [esp + 0x5c]
lea eax, [esp + 0x264]
push edx
push eax
call esi
test eax, eax
je 0x41ec55
lea ecx, [esp + 8]
push ecx
call fcn.00415100
test eax, eax
je 0x41ecbf
jmp 0x41eca3
lea edx, [esp + 0x160]
lea eax, [esp + 0x5c]
push edx
push eax
push str.__s___UPDATE:
lea ecx, [esp + 0x374]
push 0x288
push ecx
call fcn.00409970
add esp, 0x14
lea edx, [esp + 8]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x368]
push edx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x7c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x41eccc
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov dword [esp + 0x10], ebx
call esi
mov eax, dword [esp + 8]
mov dword [esp + 8], ebx
push eax
call esi
pop esi
mov al, 1
pop ebx
add esp, 0x5e8
ret 4
pop esi
xor al, al
pop ebx
add esp, 0x5e8
ret 4
Function at 0x41ece0
Capabilities:
Accept command line arguments
Copy file
Create process on windows
Terminate process

Disassembly:
sub esp, 0x158
push esi
push edi
push str._UPDATE:
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call fcn.0040c830
test eax, eax
je 0x41edcb
lea edx, [eax + 9]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
je 0x41edcb
cmp byte [esi + edx - 1], 1
jne 0x41edcb
cmp esi, 0x104
ja 0x41edcb
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], 0x44
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x60]
push edx
push eax
call fcn.0040c8c0
lea ecx, [esp + 0x5c]
mov byte [esp + esi + 0x5b], 0
push ecx
call fcn.0041eae0
lea edx, [esp + 0x5c]
push 0
mov eax, dword [esp + 0x168]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 8]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x7c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x41edc3
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov dword [esp + 0x10], 0
call esi
mov eax, dword [esp + 8]
mov dword [esp + 8], 0
push eax
call esi
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [esp + 0x164]
push ecx
call fcn.0041eae0
pop edi
pop esi
add esp, 0x158
ret 4

Function at 0x41fbe0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov eax, dword [esp + 4]
mov ecx, 4
mov edx, eax
and edx, 0xff
shr eax, 8
mov edx, dword [edx*4 + 0x433130]
xor eax, edx
dec ecx
jne 0x41fbe9
ret
Function at 0x42c0ad
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x43c7a0
cmp edx, dword [eax]
je 0x42c0cf
add eax, 8
inc ecx
cmp eax, 0x43c830
jl 0x42c0c0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x43c7a0]
jne 0x42c1fd
mov eax, dword [0x43d528]
cmp eax, 1
je 0x42c1d7
test eax, eax
jne 0x42c100
cmp dword [0x43a134], 1
je 0x42c1d7
cmp edx, 0xfc
je 0x42c1fd
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x42c137
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0042b970
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00429040
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x42c17a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00429040
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x431698
push edi
call fcn.0042d3c0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0042b970
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0042b980
lea eax, [ebp - 0xa0]
push 0x437960
push eax
call fcn.0042b980
push dword [esi + 0x43c7a4]
lea eax, [ebp - 0xa0]
push eax
call fcn.0042b980
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0042d7ef
add esp, 0x2c
pop edi
jmp 0x42c1fd
lea eax, [ebp + 8]
lea esi, [esi + 0x43c7a4]
push 0
push eax
push dword [esi]
call fcn.00429040
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x4020c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4020d9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x402114
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x402110
lea ebx, [ebx]
cmp esi, eax
jae 0x402114
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x402100
cmp esi, eax
jb 0x40211a
pop esi
pop edi
xor eax, eax
pop ebx
ret
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402940
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x45c158
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47aab0]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x34]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402987
and al, 0x10
xor cl, cl
cmp cl, al
sbb edx, edx
neg edx
jne 0x402a87
mov esi, ebp
lea eax, [esp + 0x18]
call fcn.00402380
xor esi, esi
mov dword [esp + 0x2c], esi
mov edi, dword [esp + 0x18]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4029a1
sub eax, edx
sar eax, 1
cmp eax, 1
jle 0x4029c2
cmp word [edi + eax*2 - 2], 0x5c
jne 0x4029c2
mov word [edi + eax*2 - 2], si
push 0x5c
push edi
call fcn.0043ff84
add esp, 8
cmp eax, esi
push edi
jne 0x4029fb
mov dword [esp + 0x30], 0xffffffff
call fcn.0041b267
add esp, 4
mov eax, 0xf
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov word [eax], si
call fcn.00402940
mov ebx, eax
add esp, 4
cmp ebx, esi
je 0x402a33
push edi
mov dword [esp + 0x30], 0xffffffff
call fcn.0041b267
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x402a76
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xb7
je 0x402a76
push edi
mov dword [esp + 0x30], 0xffffffff
call fcn.0041b267
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push edi
mov dword [esp + 0x30], 0xffffffff
call fcn.0041b267
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x4037d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x45bb99
mov eax, dword fs:[0]
push eax
push esi
mov eax, dword [0x47aab0]
xor eax, esp
push eax
lea eax, [esp + 8]
mov dword fs:[0], eax
mov esi, dword [esp + 0x18]
mov dword [esi], vtable.Cabinet::CExtract.0
mov dword [esp + 0x10], 5
call fcn.00403ab0
test eax, eax
je 0x40382f
mov eax, dword [0x47f240]
cmp eax, 0xffffffff
je 0x40382f
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40382f
mov eax, dword [0x47f240]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [esi + 0x110c]
test eax, eax
je 0x403840
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esi + 0x10fc]
test eax, eax
je 0x403853
push eax
call fcn.0041b267
add esp, 4
mov byte [esp + 0x10], 4
mov eax, dword [esi + 0x10dc]
push eax
call fcn.0041b267
mov byte [esp + 0x14], 3
mov eax, dword [esi + 0x10c0]
add esp, 4
test eax, eax
je 0x40387f
push eax
call fcn.0041b267
add esp, 4
mov dword [esi + 0x10c0], 0
mov byte [esp + 0x10], 2
mov eax, dword [esi + 0x60]
push eax
call fcn.0041b267
mov byte [esp + 0x14], 1
mov eax, dword [esi + 0x58]
push eax
call fcn.0041b267
mov byte [esp + 0x18], 0
mov eax, dword [esi + 0x50]
push eax
call fcn.0041b267
mov eax, dword [esi + 0x54]
push eax
call fcn.0041b267
add esp, 0x10
add esi, 8
push esi
mov dword [esp + 0x14], 0xffffffff
call fcn.00404e40
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0xc
ret 4
Function at 0x403900
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ebp, ebp
cmp dword [esi + 0x1108], eax
je 0x40392b
mov dword [esi + 0x10e8], ebp
mov dword [esi + 0x10ec], ebp
mov dword [esi + 0x10e4], 0x3f3
xor eax, eax
pop ebp
ret
mov eax, dword [0x47f240]
cmp eax, 0xffffffff
push edi
je 0x403980
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
call edi
cmp eax, ebp
je 0x40395e
pop edi
mov dword [esi + 0x10e8], ebp
mov dword [esi + 0x10ec], ebp
mov dword [esi + 0x10e4], 0x3f4
xor eax, eax
pop ebp
ret
mov eax, dword [0x47f240]
cmp eax, 0xffffffff
je 0x403980
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x403980
mov eax, dword [0x47f240]
push eax
call edi
cmp eax, ebp
jne 0x40399b
pop edi
mov dword [esi + 0x10e4], ebp
mov dword [esi + 0x10ec], ebp
mov dword [esi + 0x10e8], 0xe
xor eax, eax
pop ebp
ret
lea edi, [esi + 0x10cc]
xor eax, eax
mov dword [edi + 0x18], ebp
mov dword [edi + 0x1c], ebp
mov dword [edi + 0x20], ebp
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
cmp dword [esi + 0x10f0], ebp
jne 0x403a5e
cmp dword [esi + 0x110c], ebp
jne 0x403a63
push ebx
push str.Cabinet.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.FDICreate
push eax
mov dword [esi + 0x110c], eax
call ebx
mov ecx, dword [esi + 0x110c]
push str.FDICopy
push ecx
mov dword [esi + 0x1110], eax
call ebx
mov edx, dword [esi + 0x110c]
push str.FDIIsCabinet
push edx
mov dword [esi + 0x1114], eax
call ebx
mov dword [esi + 0x1118], eax
mov eax, dword [esi + 0x110c]
push str.FDIDestroy
push eax
call ebx
cmp dword [esi + 0x1110], ebp
mov dword [esi + 0x111c], eax
pop ebx
je 0x403a4b
cmp dword [esi + 0x1114], ebp
je 0x403a4b
cmp dword [esi + 0x1118], ebp
je 0x403a4b
cmp eax, ebp
jne 0x403a63
mov dword [esi + 0x110c], ebp
mov dword [edi + 0x18], 0x3e8
mov dword [edi + 0x1c], ebp
mov dword [edi + 0x20], ebp
pop edi
xor eax, eax
pop ebp
ret
mov ecx, dword [esi + 0x1110]
push edi
push 1
push 0x4040b0
push 0x404040
push 0x404000
push 0x403fd0
push 0x403f90
push 0x403f80
push 0x403f70
call ecx
add esp, 0x24
xor edx, edx
cmp eax, ebp
setne dl
pop edi
mov dword [esi + 0x10f0], eax
pop ebp
mov eax, edx
ret