joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1005c140
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
cmp dword [edi + 0x1c], 0x10
lea esi, [edi + 8]
mov ebx, dword [edi + 0x18]
jb 0x1005c15c
mov esi, dword [edi + 8]
xor ecx, ecx
mov edx, 0x811c9dc5
test ebx, ebx
je 0x1005c178
movzx eax, byte [ecx + esi]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, ebx
jb 0x1005c167
mov ebx, dword [ebp - 4]
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0xc]
and eax, edx
lea edx, [eax*8]
mov eax, dword [ecx + edx]
add ecx, edx
cmp dword [ecx + 4], edi
jne 0x1005c1b1
cmp eax, edi
jne 0x1005c1a9
mov eax, dword [ebx + 4]
mov dword [ecx], eax
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 4]
mov dword [edx + ecx + 4], eax
jmp 0x1005c1b9
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
jmp 0x1005c1b9
cmp eax, edi
jne 0x1005c1b9
mov eax, dword [edi]
mov dword [ecx], eax
mov eax, dword [edi + 4]
lea ecx, [edi + 8]
mov esi, dword [edi]
mov dword [eax], esi
mov edx, dword [edi]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
dec dword [ebx + 8]
call fcn.10017830
push 0x3c
push edi
call fcn.1005cbc1
mov eax, dword [ebp + 8]
add esp, 8
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x1005c420
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
mov dword [0x100e80d0], 0x506df0
push eax
push 0x40
push 0x16
push 0x50610b
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1005c475
mov eax, 0x50610b
mov ecx, 0x90909090
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov word [eax + 0x14], cx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push 0x16
push 0x50610b
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
call fcn.10001250
push 0x1005c4a0
push 0x100e80d0
call fcn.10001aa0
call fcn.100014b0
mov esp, ebp
pop ebp
ret

Function at 0x100899c7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1008983d

Function at 0x10098329
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret
Function at 0x4025e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x40e8a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push esi
xor eax, eax
push edi
mov esi, ecx
mov dword [esp + 8], eax
mov edi, dword [esp + 0x68]
push edi
sub esp, 0x24
mov dword [esp + 0x60], eax
lea eax, [esp + 0x6c]
mov ecx, esp
mov dword [esp + 0x90], esp
push eax
call fcn.004024a0
push edi
sub esp, 0x24
lea edx, [esp + 0x94]
mov ecx, esp
mov dword [esp + 0x58], esp
push edx
mov byte [esp + 0x8c], 1
call fcn.004024a0
mov eax, dword [esi]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, esi
call dword [eax + 0x5c]
mov esi, dword [esp + 0x68]
mov edx, dword [eax]
push esi
mov ecx, eax
mov byte [esp + 0x64], 3
call dword [edx + 0x58]
lea ecx, [esp + 0xc]
call fcn.00401d70
lea ecx, [esp + 0x44]
call fcn.00401d70
mov ecx, dword [esp + 0x30]
pop edi
mov eax, esi
mov dword fs:[0], ecx
pop esi
add esp, 0x34
ret 0x2c

Function at 0x403a90
Capabilities:
Get file version info

Disassembly:
sub esp, 0x110
mov eax, dword [esp + 0x114]
push ebp
push esi
push edi
push eax
lea ecx, [esp + 0x1c]
xor ebp, ebp
push ecx
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [edx], 0
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, ebp
je 0x403b56
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebp
je 0x403b56
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
push ebx
push esi
push ebp
lea edx, [esp + 0x28]
push edx
call sub.VERSION.dll_GetFileVersionInfoA
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
push ecx
push 0x40f2a4
push ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
pop ebx
je 0x403b48
mov eax, dword [esp + 0xc]
movzx edx, word [eax + 0xc]
movzx ecx, word [eax + 0xe]
push edx
movzx edx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
mov ecx, dword [esp + 0x12c]
push edx
push eax
push str._u._u._u._u
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
mov ebp, 1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
mov eax, ebp
pop ebp
add esp, 0x110
ret
Function at 0x404560
Capabilities:
Query environment variable
Read .ini file

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x410
test edx, edx
je 0x404584
mov ecx, dword [esp + 0x418]
test ecx, ecx
je 0x404584
mov eax, dword [esp + 0x41c]
test eax, eax
jne 0x40458d
xor eax, eax
add esp, 0x410
ret
push esi
mov esi, dword [esp + 0x424]
test esi, esi
je 0x4045ee
push edx
push 0x410
lea edx, [esp + 0xc]
push edx
push 0x40f32b
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jbe 0x4045ee
mov eax, dword [esp + 0x428]
push eax
push esi
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4045ee
cmp eax, 0x410
ja 0x4045ee
push esi
call fcn.00403de0
add esp, 4
test al, al
je 0x4045ee
mov eax, 1
pop esi
add esp, 0x410
ret
xor eax, eax
pop esi
add esp, 0x410
ret
Function at 0x407ab3
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x407ad3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040b8ea
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x407af4
test byte [esp + 8], 2
je 0x407af4
mov dword [0x413548], 0xd
mov dword [0x41354c], 5
jmp 0x407acf
xor eax, eax
ret

Function at 0x4086fe
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x413594], esi
push edi
jne 0x40871e
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x413590], esi
mov byte [0x41358c], al
jne 0x408784
mov ecx, dword [0x414aac]
test ecx, ecx
je 0x408765
mov eax, dword [0x414aa8]
sub eax, 4
cmp eax, ecx
jmp 0x40875e
mov eax, dword [eax]
test eax, eax
je 0x408750
call eax
mov eax, dword [0x414aa8]
sub eax, 4
cmp eax, dword [0x414aac]
mov dword [0x414aa8], eax
jae 0x408748
mov eax, 0x412024
mov esi, 0x41202c
cmp eax, esi
mov edi, eax
jae 0x408784
mov eax, dword [edi]
test eax, eax
je 0x40877d
call eax
add edi, 4
cmp edi, esi
jb 0x408775
mov eax, 0x412030
mov esi, 0x412038
cmp eax, esi
mov edi, eax
jae 0x4087a3
mov eax, dword [edi]
test eax, eax
je 0x40879c
call eax
add edi, 4
cmp edi, esi
jb 0x408794
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4087be
push dword [ebp + 8]
mov dword [0x413594], 1
call fcn.00408669
pop ecx
pop ebp
ret

Function at 0x40a70b
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00406850
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a7a0
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x413554]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, reloc.KERNEL32.dll_GetModuleHandleA
add ecx, edi
cmp esi, ecx
jb 0x40a7a0
cmp eax, 1
je 0x40a7b8
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a7a0
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x40a775
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x40a79c
xor eax, eax
inc eax
jmp 0x40a7d4
cmp esi, ebx
jae 0x40a7a4
xor eax, eax
jmp 0x40a7d4
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x413554]
jmp 0x40a7ba
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b949
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x412170]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4123f0]
je 0x40b976
inc eax
cmp eax, 0x12
jb 0x40b967
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4123f0]
jne 0x40baaa
mov eax, dword [0x41351c]
cmp eax, 1
je 0x40ba85
cmp eax, edx
jne 0x40b9a6
cmp dword [0x412134], 1
je 0x40ba85
cmp ecx, 0xfc
je 0x40baaa
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b9df
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00408800
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.004080e0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40ba21
lea eax, [ebp - 0x10c]
push eax
call fcn.004080e0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x40fe48
push edi
call fcn.004071f0
add esp, 0x10
push edi
call fcn.004080e0
push dword [esi + 0x4123f4]
mov ebx, eax
call fcn.004080e0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406850
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408800
push edi
push ebx
call fcn.00408810
push 0x40fe28
push ebx
call fcn.00408810
push dword [esi + 0x4123f4]
push ebx
call fcn.00408810
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040e1db
add esp, 0x2c
jmp 0x40baaa
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x4123f4]
push dword [esi]
call fcn.004080e0
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]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.0040ab85
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c9c8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x412170]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x414724]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x40cb58
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x414740]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x18], ebx
je 0x40cb58
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x40ca27
xor eax, eax
jmp 0x40cb6c
test al, 0x20
je 0x40ca38
push 2
push edi
push edi
push ecx
call fcn.0040e562
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40caf4
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x40cb2c
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x40ca8e
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40ca7f
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x18]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40ca64
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40cace
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x40cad7
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40ca58
jmp 0x40cad9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x40cb53
cmp dword [ebp + 8], edi
je 0x40cb2c
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x40cb21
mov dword [0x41354c], eax
jmp 0x40cb5f
push edi
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40cb16
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x40cad9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x40cad9
push dword [ebp + 8]
call fcn.0040b8ea
pop ecx
jmp 0x40cb69
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40cb41
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x40ca20
mov dword [0x413548], 0x1c
mov dword [0x41354c], edi
jmp 0x40cb69
sub eax, dword [ebp - 0x14]
jmp 0x40cb6c
and dword [0x41354c], 0
mov dword [0x413548], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.0040ab85
leave
ret
Function at 0x40d260
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x414724]
push edi
jae 0x40d427
mov eax, esi
sar eax, 5
lea ebx, [eax*4 + 0x414740]
mov eax, dword [ebx]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40d427
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov edi, dword [ebp + 0xc]
mov ecx, edi
je 0x40d306
test dl, 2
jne 0x40d306
test dl, 0x48
je 0x40d2d0
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40d2d0
dec dword [ebp + 0x10]
mov byte [edi], al
mov eax, dword [ebx]
lea ecx, [edi + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [ebx]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d319
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40d301
mov dword [0x41354c], ecx
jmp 0x40d42e
cmp eax, 0x6d
jne 0x40d30d
xor eax, eax
jmp 0x40d43b
push eax
call fcn.0040b8ea
pop ecx
jmp 0x40d438
mov eax, dword [ebx]
mov edx, dword [ebp - 0x10]
add dword [ebp - 0xc], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x40d422
test edx, edx
je 0x40d33c
cmp byte [edi], 0xa
jne 0x40d33c
or al, 4
jmp 0x40d33e
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40d41c
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40d40c
cmp al, 0xd
je 0x40d372
mov byte [edi], al
inc edi
inc dword [ebp - 8]
jmp 0x40d3fe
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40d38c
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40d387
add dword [ebp - 8], 2
jmp 0x40d3e0
mov dword [ebp - 8], eax
jmp 0x40d3fa
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d3b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40d3fa
cmp dword [ebp - 0x10], 0
je 0x40d3fa
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x48
je 0x40d3d5
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40d3e0
mov byte [edi], 0xd
mov ecx, dword [ebx]
mov byte [ecx + esi + 5], al
jmp 0x40d3fd
cmp edi, dword [ebp + 0xc]
jne 0x40d3e5
cmp byte [ebp - 1], 0xa
jne 0x40d3e5
mov byte [edi], 0xa
jmp 0x40d3fd
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c93c
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40d3fe
mov byte [edi], 0xd
inc edi
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40d356
jmp 0x40d41c
mov eax, dword [ebx]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40d41c
or al, 2
mov byte [esi], al
sub edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
mov eax, dword [ebp - 0xc]
jmp 0x40d43b
and dword [0x41354c], 0
mov dword [0x413548], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e1db
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4136f0], ebx
push esi
push edi
jne 0x40e25b
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40e296
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4100ec
push edi
call esi
test eax, eax
mov dword [0x4136f0], eax
je 0x40e296
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4136f4], eax
call esi
cmp dword [0x413554], 2
mov dword [0x4136f8], eax
jne 0x40e25b
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x413700], eax
je 0x40e25b
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4136fc], eax
mov eax, dword [0x4136fc]
test eax, eax
je 0x40e2a0
call eax
test eax, eax
je 0x40e287
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x413700]
test eax, eax
je 0x40e287
test byte [ebp - 8], 1
jne 0x40e2a0
cmp dword [0x413560], 4
jb 0x40e29a
or byte [ebp + 0x12], 0x20
jmp 0x40e2bf
xor eax, eax
jmp 0x40e2cf
or byte [ebp + 0x12], 4
jmp 0x40e2bf
mov eax, dword [0x4136f4]
test eax, eax
je 0x40e2bf
call eax
mov ebx, eax
test ebx, ebx
je 0x40e2bf
mov eax, dword [0x4136f8]
test eax, eax
je 0x40e2bf
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4136f0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e662
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00406850
mov eax, dword [0x412170]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x414724]
mov dword [ebp - 4], eax
jae 0x40e7a2
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x414740]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40e7a2
push 1
push esi
push ebx
call fcn.0040c93c
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40e7ac
push 2
push esi
push ebx
call fcn.0040c93c
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e7ac
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40e74f
push 0x1000
lea eax, [ebp - 0x1008]
push esi
push eax
call fcn.0040e3a0
push 0x8000
push ebx
call fcn.0040e7be
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40e70e
mov eax, edi
push eax
lea eax, [ebp - 0x1008]
push eax
push ebx
call fcn.0040c9c8
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e72c
sub edi, eax
test edi, edi
jg 0x40e703
jmp 0x40e742
cmp dword [0x41354c], 5
jne 0x40e73f
mov dword [0x413548], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040e7be
pop ecx
pop ecx
jmp 0x40e78f
jge 0x40e78f
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040c93c
push ebx
call fcn.0040d5ce
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x40e78f
mov dword [0x413548], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x41354c], eax
push 0
push dword [ebp - 8]
push ebx
call fcn.0040c93c
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40e7af
mov dword [0x413548], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.0040ab85
leave
ret
Function at 0x408190
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x4081c6
mov dword [esp + 4], sym.get_globals_dtor_void_
mov dword [esp], eax
mov dword [0x43b830], eax
call sym.___mingwthr_key_dtor
test eax, eax
sete al
movzx eax, al
mov dword [0x434080], eax
mov esp, ebp
pop ebp
ret
call fcn.004112d0
jmp 0x4081b5

Function at 0x40bb30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fread
mov esp, ebp
pop ebp
ret

Function at 0x40bb60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fwrite
mov esp, ebp
pop ebp
ret

Function at 0x40d620
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], ebx
mov ebx, dword [0x43ba60]
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40d661
mov dword [ebx + 0x28], eax
mov dword [esp + 4], sym._fc_key_dtor
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call sym.___mingwthr_key_dtor
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x2c], eax
mov ebx, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
call fcn.004112d0
jmp 0x40d64f
Function at 0x40d9b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x43ba60]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40db32
mov ecx, dword [eax + 0x2c]
test ecx, ecx
js 0x40db23
mov edx, dword [eax + 0x2c]
test edx, edx
jne 0x40dafa
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x10], eax
lea esi, [esi]
lea edi, [edi]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x40daf0
xor ecx, ecx
mov eax, 5
cmp eax, 5
mov edx, 5
je 0x40da5b
test eax, eax
mov edx, 3
jne 0x40da5b
test ecx, ecx
jne 0x40da23
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
jmp 0x40d9f0
mov dword [esp + 0x10], edi
lea ebx, [ebp - 0x14]
mov dword [esp + 0x14], ebx
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp], 1
call ecx
cmp eax, 6
je 0x40da65
cmp eax, 8
mov edx, 3
je 0x40da1c
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call sym.__Unwind_RaiseException_Phase2
cmp eax, 7
mov edx, eax
jne 0x40da5b
mov eax, dword [0x43ba60]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40dae2
mov edi, dword [eax + 0x2c]
test edi, edi
js 0x40dad6
mov esi, dword [eax + 0x2c]
test esi, esi
jne 0x40dab9
mov dword [eax + 0x24], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ebp, dword [eax + 0x20]
mov ecx, dword [edx + 4]
mov esp, dword [edx + 8]
jmp ecx
mov eax, dword [eax + 0x28]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x40daa8
call fcn.004112d0
jmp 0x40daa8
call sym._fc_key_init_once
mov eax, dword [0x43ba60]
jmp 0x40da9e
call sym.___w32_sharedptr_initialize
mov eax, dword [0x43ba60]
jmp 0x40da97
mov ecx, dword [eax + 0x18]
xor eax, eax
jmp 0x40da05
mov ebx, dword [eax + 0x28]
call fcn.004112d0
mov esi, eax
mov dword [esp], ebx
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_SetLastError
sub esp, 4
mov eax, ebx
jmp 0x40d9e2
call sym._fc_key_init_once
mov eax, dword [0x43ba60]
jmp 0x40d9d4
call sym.___w32_sharedptr_initialize
mov eax, dword [0x43ba60]
jmp 0x40d9c9