joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10020930
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
sub eax, 0x10000
push eax
call fcn.10020ae0
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jbe 0x100209fd
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x1002097a
mov eax, dword [ebp - 4]
cmp eax, dword [0x10057004]
ja 0x1002097a
mov ecx, dword [ebp - 4]
sub ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x1002094a
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call fcn.1002aef0
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x100209a0
jmp 0x100209fd
cmp dword [ebp - 0x14], 0x10000
jne 0x100209e3
cmp dword [ebp - 0x18], 0x10000
jb 0x100209e3
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x100209d6
mov eax, dword [ebp - 8]
jmp 0x100209ff
mov eax, dword [ebp - 4]
sub eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x100209f8
mov ecx, dword [ebp - 0x20]
sub ecx, 0x10000
push ecx
call fcn.10020ae0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x1002094a
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10020a10
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push eax
call fcn.10020b10
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x10020ad5
mov edx, dword [ebp - 4]
cmp edx, dword [section..data]
jb 0x10020a55
mov eax, dword [ebp - 4]
cmp eax, dword [0x10057004]
ja 0x10020a55
mov ecx, dword [ebp - 4]
add ecx, 0x8000000
mov dword [ebp - 4], ecx
jmp 0x10020a25
push 0x1c
push 0
lea edx, [ebp - 0x24]
push edx
call fcn.1002aef0
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10020a7b
jmp 0x10020ad5
cmp dword [ebp - 0x14], 0x10000
jne 0x10020abe
cmp dword [ebp - 0x18], 0x10000
jb 0x10020abe
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10020ab1
mov eax, dword [ebp - 8]
jmp 0x10020ad7
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x10020ad0
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x18]
push ecx
call fcn.10020b10
add esp, 4
mov dword [ebp - 4], eax
jmp 0x10020a25
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10020b40
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10020f30
add esp, 0xc
mov dword [ebp - 4], 0
cmp dword [0x1019eac4], 0
jne 0x10020b7d
cmp dword [0x1019eac0], 0
je 0x10020b7d
mov eax, dword [0x1019eac0]
mov dword [0x1019eac4], eax
cmp dword [0x1019eac4], 0
je 0x10020bfa
mov ecx, dword [0x1019eac4]
cmp dword [ecx + 8], 0
je 0x10020bfa
mov edx, dword [0x1019eac4]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0x10]
jb 0x10020bfa
mov ecx, dword [0x1019eac4]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0xc]
ja 0x10020bfa
mov eax, dword [0x1019eac4]
mov ecx, dword [eax + 8]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jb 0x10020bc9
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jbe 0x10020bd0
xor eax, eax
jmp 0x10020d19
mov ecx, dword [0x1019eac4]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x40]
mov dword [ecx + 8], eax
push 0x48
push 0xcc
mov ecx, dword [ebp - 4]
push ecx
call fcn.1002aef0
add esp, 0xc
mov eax, dword [ebp - 4]
jmp 0x10020d19
mov edx, dword [0x1019eac0]
mov dword [0x1019eac4], edx
jmp 0x10020c16
mov eax, dword [0x1019eac4]
mov ecx, dword [eax + 4]
mov dword [0x1019eac4], ecx
cmp dword [0x1019eac4], 0
je 0x10020c56
cmp dword [0x1019eac4], 0
je 0x10020c54
mov edx, dword [0x1019eac4]
cmp dword [edx + 8], 0
je 0x10020c54
mov eax, dword [0x1019eac4]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 0x10]
jb 0x10020c54
mov edx, dword [0x1019eac4]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0xc]
ja 0x10020c54
jmp 0x10020bae
jmp 0x10020c08
mov ecx, dword [ebp + 8]
and ecx, 0xffff
mov edx, dword [ebp + 8]
sub edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10020d20
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x10020d17
mov eax, dword [ebp - 0x18]
mov dword [0x1019eac4], eax
mov ecx, dword [0x1019eac4]
mov dword [ecx], 0x52727464
mov edx, dword [0x1019eac4]
mov dword [edx + 8], 0
mov eax, dword [0x1019eac4]
mov ecx, dword [0x1019eac0]
mov dword [eax + 4], ecx
mov edx, dword [0x1019eac4]
mov dword [0x1019eac0], edx
mov dword [ebp - 0x14], 0
mov eax, dword [0x1019eac4]
add eax, 0x48
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0x38c
jmp 0x10020ce7
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 1
jle 0x10020d07
imul edx, dword [ebp - 8], 0x48
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
mov dword [eax + edx + 0x40], ecx
imul edx, dword [ebp - 8], 0x48
add edx, dword [ebp - 4]
mov dword [ebp - 0x14], edx
jmp 0x10020cde
mov eax, dword [0x1019eac4]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 8], ecx
jmp 0x10020bae
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10036003
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.10035e82

Function at 0x1003d968
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1003d628

Function at 0x40e850
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xb000]
push edi
jmp 0x40e86a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x40e871
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x40e860
mov eax, 1
add ebx, ebx
jne 0x40e883
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x40e878
jne 0x40e894
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x40e878
xor ecx, ecx
sub eax, 3
jb 0x40e8a8
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x40e91a
mov ebp, eax
add ebx, ebx
jne 0x40e8b3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x40e8c0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40e8e4
inc ecx
add ebx, ebx
jne 0x40e8d0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x40e8c5
jne 0x40e8e1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x40e8c5
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40e904
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40e8f5
jmp 0x40e866
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40e904
add edi, ecx
jmp 0x40e866
pop esi
mov edi, esi
mov ecx, 0x84
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40e922
cmp byte [edi], 3
jne 0x40e922
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 0x40e927
lea edi, [esi + 0xc000]
mov eax, dword [edi]
or eax, eax
je 0x40e996
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x11108]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x11130]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40e954
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x11138]
or eax, eax
je 0x40e990
mov dword [ebx], eax
add ebx, 4
jmp 0x40e971
call dword [esi + 0x11134]
mov ebp, dword [esi + 0x1113c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1f7]
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 0x40e9ca
sub esp, 0xffffff80
jmp 0x401005
Function at 0x401970
Capabilities:
Get system information on windows

Disassembly:
push ebx
push edi
push esi
sub esp, 0x24
mov edi, dword [ecx + 8]
xorps xmm0, xmm0
mov esi, ecx
mov ebx, esp
mov dword [esp + 0x20], 0
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
push ebx
call sub.KERNEL32.dll_GetSystemInfo
mov eax, dword [esp + 0x1c]
cmp eax, 1
adc eax, 0
cmp edi, eax
je 0x4019e2
xorps xmm0, xmm0
mov dword [esp + 0x20], 0
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
push ebx
call sub.KERNEL32.dll_GetSystemInfo
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4019e9
mov eax, edi
xor edx, edx
div ecx
sub edi, edx
push edi
call sub.KERNEL32.dll_UnmapViewOfFile
cmp dword [esi], 0
je 0x4019e2
push dword [esi + 4]
call sub.KERNEL32.dll_CloseHandle
add esp, 0x24
pop esi
pop edi
pop ebx
ret
push 0x41b4ec
push 0x39
push str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
call fcn.0041a540
int3

Function at 0x401a30
Capabilities:
Get system information on windows

Disassembly:
push ebx
push edi
push esi
sub esp, 0x24
mov edi, dword [esp + 0x34]
xorps xmm0, xmm0
mov ebx, esp
mov dword [esp + 0x20], 0
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
mov esi, dword [edi + 8]
push ebx
call sub.KERNEL32.dll_GetSystemInfo
mov eax, dword [esp + 0x1c]
cmp eax, 1
adc eax, 0
cmp esi, eax
je 0x401aa4
xorps xmm0, xmm0
mov dword [esp + 0x20], 0
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
push ebx
call sub.KERNEL32.dll_GetSystemInfo
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x401aab
mov eax, esi
xor edx, edx
div ecx
sub esi, edx
push esi
call sub.KERNEL32.dll_UnmapViewOfFile
cmp dword [edi], 0
je 0x401aa4
push dword [edi + 4]
call sub.KERNEL32.dll_CloseHandle
add esp, 0x24
pop esi
pop edi
pop ebx
ret
push 0x41b4ec
push 0x39
push str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
call fcn.0041a540
int3
Function at 0x401b90
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x401d80
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x18]
xorps xmm0, xmm0
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov ecx, 0x80
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0
mov eax, dword [edx + 8]
cmp byte [edx + 0x10], 0
mov dword [ebp - 0x20], eax
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x4c], eax
mov eax, 0x20
cmove ecx, eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x48], ecx
push eax
call sub.KERNEL32.dll_GetSystemInfo
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp + 8]
cmp eax, 1
adc eax, 0
cmp dword [ebp - 0x20], eax
je 0x401c67
xorps xmm0, xmm0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x24], 0
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
push eax
call sub.KERNEL32.dll_GetSystemInfo
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x401d23
mov esi, dword [ebp - 0x20]
xor edx, edx
mov eax, esi
div ecx
mov eax, esi
mov esi, dword [ebp - 0x4c]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], 0
sub eax, edx
add esi, edx
push ecx
push dword [ebp - 0x48]
push esi
push eax
call sub.KERNEL32.dll_VirtualProtect
mov edi, dword [ebp + 8]
test eax, eax
je 0x401c95
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x10]
movsd xmm0, qword [ecx]
movsd xmm1, qword [ecx + 8]
mov dword [edi + 0x10], eax
movsd qword [edi + 8], xmm1
movsd qword [edi], xmm0
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, edi
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.0040a340
mov edi, dword [ebp + 8]
xorps xmm0, xmm0
lea ebx, [ebp - 0x44]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0xffffffff
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
mov byte [edi + 4], 0
mov dword [edi + 8], eax
mov dword [edi], 2
push ebx
call sub.KERNEL32.dll_GetSystemInfo
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp + 0xc]
cmp eax, 1
adc eax, 0
cmp dword [ebp - 0x20], eax
je 0x401c82
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
push ebx
call sub.KERNEL32.dll_GetSystemInfo
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x401d39
mov ebx, dword [ebp - 0x20]
xor edx, edx
mov eax, ebx
div ecx
sub ebx, edx
push ebx
call sub.KERNEL32.dll_UnmapViewOfFile
cmp dword [esi], 0
je 0x401c82
push dword [esi + 4]
call sub.KERNEL32.dll_CloseHandle
jmp 0x401c82
push 0x41b4dc
push 0x39
push str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
call fcn.0041a540
add esp, 0xc
ud2
push 0x41b4ec
push 0x39
push str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
call fcn.0041a540
nop word [eax + eax]
push ebp
sub esp, 0x10
add ebp, 0xc
mov ecx, dword [ebp + 0xc]
call fcn.00401970
add esp, 0x10
pop ebp
ret
Function at 0x404090
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x43c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x40d5d0
mov esi, 0x200
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x2c], 0
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 2
mov dword [ebp - 0x30], 0
cmp esi, 0x201
jae 0x404120
jmp 0x40410e
jbe 0x4041b4
cmp esi, 0x201
jae 0x404120
mov dword [ebp - 0x28], 0x200
lea ebx, [ebp - 0x448]
mov edi, esi
jmp 0x40415b
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x2c]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x40414c
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x38]
mov edx, edi
push esi
call fcn.00419bc0
add esp, 4
mov edi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
test eax, eax
jne 0x40417f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404217
cmp esi, edi
jne 0x404100
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x404236
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x40410e
jmp 0x404120
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], 0
cmp esi, eax
ja 0x404253
lea eax, [ebp - 0x48]
push esi
push ebx
push eax
call fcn.004059e0
add esp, 0xc
movsd xmm0, qword [ebp - 0x48]
mov esi, dword [ebp + 8]
movsd xmm1, qword [ebp - 0x40]
movsd qword [esi + 8], xmm1
movsd qword [esi], xmm0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x404201
add eax, eax
push 2
push eax
push dword [ebp - 0x24]
call fcn.00401800
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x43c
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp + 8]
mov byte [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi], 0x80000000
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4041f1
jmp 0x404201
mov dword [ebp - 0x10], 0
push 0x41cf98
push 0x28
push str.internal_error:_entered_unreachable_code_rustc_07dca489ac2d933c78d3c5158e3f43beefeb02celibrary_alloc_src_vecmod.rs
call fcn.0041a540
add esp, 0xc
jmp 0x404262
push 0x41cf88
push eax
push esi
call fcn.0041a8c0
add esp, 0xc
ud2
Function at 0x40a230
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov esi, ecx
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], 0
mov edi, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x103
je 0x40a274
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
lea edx, [esp + 0x20]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
xor eax, eax
mov ebx, 1
jmp 0x40a27a
xor ebx, ebx
xor eax, eax
xor edx, edx
mov dword [esp + 0x1c], eax
lea eax, [esp + 8]
mov dword [esp + 0x18], ebx
push 0
push edx
push ecx
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x40a2b6
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
cmp eax, 0x103
je 0x40a2db
test eax, eax
js 0x40a2c5
mov eax, dword [esp + 0xc]
mov dword [esi + 4], eax
mov al, 4
jmp 0x40a2d1
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov dword [esi + 4], eax
xor eax, eax
mov byte [esi], al
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 4]
mov dword [esp + 0x18], 0x41ca68
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 0
mov dword [esp + 0x10], 0
mov byte [esp + 0x14], 0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x34]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x24], 0
push eax
push ecx
push edx
call fcn.00405720
add esp, 0xc
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
call fcn.004025f0
mov ecx, 7
int 0x29
ud2
Function at 0x40b420
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x40d810
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
movzx eax, byte [0x42216c]
test al, al
je 0x40b5f1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b46c
cmp eax, 3
jne 0x40b5ea
mov ebx, dword [0x422170]
test ebx, ebx
je 0x40b5ea
mov dword [ebp - 0x20], 0
jmp 0x40b497
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x40b4c8
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x40b63b
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40b490
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x40b490
test byte [ebp - 0x20], 1
je 0x40b5ea
mov ebx, dword [0x422170]
test ebx, ebx
je 0x40b5ea
mov dword [ebp - 0x20], 0
jmp 0x40b4f7
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x40b528
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x40b63b
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40b4f0
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x40b4f0
test byte [ebp - 0x20], 1
je 0x40b5ea
mov ebx, dword [0x422170]
test ebx, ebx
je 0x40b5ea
mov dword [ebp - 0x20], 0
jmp 0x40b557
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x40b588
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x40b63b
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40b550
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x40b550
test byte [ebp - 0x20], 1
je 0x40b5ea
mov ebx, dword [0x422170]
test ebx, ebx
je 0x40b5ea
mov dword [ebp - 0x20], 0
jmp 0x40b5b7
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x40b5e4
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x40b63b
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40b5b0
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x40b5b0
test byte [ebp - 0x20], 1
jne 0x40b604
movzx eax, byte [0x41f3c0]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov ebx, dword [0x422170]
jmp 0x40b60f
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x40b5ea
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x40b63b
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40b60c
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
jmp 0x40b60c
mov dword [ebp - 0x10], 0
push 0x41cedc
push 0x2b
push 0x41b5e0
call fcn.0041a540
add esp, 0xc
ud2
Function at 0x40d0b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
mov eax, dword [0x422038]
mov esi, ecx
test eax, eax
je 0x40d0d6
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x40d0ef
cmp dword [eax + 4], 0
je 0x40d0ef
add eax, 8
pop esi
pop edi
ret
push 0x422038
call fcn.00419de0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x40d0ca
mov eax, dword [0x422038]
test eax, eax
je 0x40d186
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x40d1a3
mov edi, eax
test eax, eax
jne 0x40d14f
movzx eax, byte [0x4220f9]
push 4
push 0x10
call fcn.004017f0
add esp, 8
test eax, eax
je 0x40d1b7
mov dword [eax], 0x422038
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x422038]
test eax, eax
je 0x40d1a8
dec eax
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
je 0x40d16f
mov eax, dword [esi]
xor ecx, ecx
mov edx, 0
mov dword [esi], 0
cmp eax, 1
jne 0x40d173
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
jmp 0x40d173
xor ecx, ecx
xor edx, edx
lea eax, [edi + 8]
mov dword [edi + 4], 1
mov dword [edi + 8], ecx
mov byte [edi + 0xc], dl
pop esi
pop edi
ret
push 0x422038
call fcn.00419de0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x40d10d
xor eax, eax
pop esi
pop edi
ret
push 0x422038
call fcn.00419de0
add esp, 4
jmp 0x40d147
push 0x10
push 4
call fcn.0041a3a0

Function at 0x40d1c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
sub esp, 8
mov eax, dword [0x422048]
mov esi, ecx
test eax, eax
je 0x40d29a
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x40d1ed
cmp dword [eax + 4], 0
mov edi, eax
jne 0x40d295
mov eax, dword [0x422048]
test eax, eax
je 0x40d2bc
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x40d2d9
mov edi, eax
test eax, eax
jne 0x40d251
movzx eax, byte [0x4220f9]
push 4
push 0xc
call fcn.004017f0
add esp, 8
test eax, eax
je 0x40d2f5
mov dword [eax], 0x422048
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x422048]
test eax, eax
je 0x40d2e3
dec eax
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
je 0x40d266
mov eax, dword [esi]
mov dword [esi], 0
test eax, eax
je 0x40d268
mov eax, dword [esi + 4]
jmp 0x40d268
xor eax, eax
mov edx, dword [edi + 4]
mov ecx, dword [edi + 8]
test edx, edx
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [edi + 4], 1
mov dword [edi + 8], eax
je 0x40d295
test ecx, ecx
je 0x40d295
lock dec dword [ecx]
jne 0x40d295
lea ecx, [esp + 4]
call fcn.00403230
add edi, 8
jmp 0x40d2db
push 0x422048
call fcn.00419de0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x40d1e1
jmp 0x40d1ed
push 0x422048
call fcn.00419de0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x40d20b
xor edi, edi
mov eax, edi
add esp, 8
pop esi
pop edi
ret
push 0x422048
call fcn.00419de0
add esp, 4
jmp 0x40d249
push 0xc
push 4
call fcn.0041a3a0
int3