joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4207a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0xc52094
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0xc5208c]
sub esp, 4
test ebx, ebx
je 0x4207f5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4207ee
test esi, esi
je 0x4207ee
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4207d0
mov dword [esp], 0xc52094
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x420b30
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x420b55
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x420b60
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x420b55
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x420ba8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x420b9e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x420baa
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x420b90
xor eax, eax
pop ebx
pop esi
ret
Function at 0x427050
Capabilities:
Get common file path

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x120]
push ecx
sub esp, 0x148
call fcn.0041ff20
mov eax, dword [0xc52044]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
sub esp, 8
test eax, eax
je 0x427219
mov dword [esp], str..zip
call fcn.00426de0
mov dword [esp], str..exe
mov edi, eax
call fcn.00426de0
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x12c], eax
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov edx, dword [ebp - 0x12c]
lea eax, [edx + eax + 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x130], eax
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov edx, dword [ebp - 0x12c]
lea eax, [edx + eax + 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x12c], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 4], str._s_s
mov ecx, dword [ebp - 0x130]
mov dword [esp], ecx
call fcn.00421080
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str._s_s
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call fcn.00421080
lea eax, [ebp - 0x128]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x426f10
mov dword [esp + 4], 0x17d4bb
mov dword [esp], 0x4280e0
call fcn.0041f66b
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
lea eax, [ebp - 0x124]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x426f10
mov dword [esp + 4], 0x5beebc
mov dword [esp], 0x5a55a0
call fcn.0041f66b
mov dword [esp], str.after_n
call fcn.00426fd0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x124]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esp], eax
call ebx
push edx
push edx
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x128]
mov dword [esp], eax
call ebx
push ecx
push ecx
mov dword [esp], edi
call sub.msvcrt.dll_free
mov dword [esp], esi
call sub.msvcrt.dll_free
mov ecx, dword [ebp - 0x130]
test ecx, ecx
je 0x4271fe
mov dword [esp], ecx
call sub.msvcrt.dll_free
cmp dword [ebp - 0x12c], 0
je 0x427215
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor eax, eax
jmp 0x42722a
mov dword [esp], str.Failed_to_get_temp_path
call sub.msvcrt.dll_perror
mov eax, 1
mov edx, dword [ebp - 0x1c]
sub edx, dword [0xc52044]
jne 0x427241
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
call fcn.0041fe30
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
ud2
Function at 0x401350
Capabilities:
Hash data with md5

Disassembly:
sub esp, 0x68
mov eax, dword [0x476cd4]
xor eax, esp
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x6c]
xor ecx, ecx
push esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ecx
push eax
mov eax, dword [esp + 0x78]
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0x67452301
mov dword [esp + 0x10], 0xefcdab89
mov dword [esp + 0x14], 0x98badcfe
mov dword [esp + 0x18], 0x10325476
call fcn.00404f20
add esp, 4
lea esi, [esp + 8]
mov ecx, edi
call fcn.00404fc0
mov ecx, dword [esp + 0x64]
pop esi
xor ecx, esp
call fcn.0043f03d
add esp, 0x68
ret
Function at 0x401a10
Capabilities:
Hash data with md5

Disassembly:
sub esp, 0x6c
mov eax, dword [0x476cd4]
xor eax, esp
mov dword [esp + 0x68], eax
push esi
lea eax, [esp + 8]
mov esi, edx
push eax
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], 0x67452301
mov dword [esp + 0x1c], 0xefcdab89
mov dword [esp + 0x20], 0x98badcfe
mov dword [esp + 0x24], 0x10325476
call fcn.00403a80
add esp, 8
test eax, eax
jne 0x401a7b
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0043f03d
add esp, 0x6c
ret
mov eax, dword [esp + 0x74]
test eax, eax
jbe 0x401a90
push esi
lea ecx, [esp + 0x14]
call fcn.00404f20
add esp, 4
lea esi, [esp + 0x10]
mov ecx, ebx
call fcn.00404fc0
test edi, edi
je 0x401aae
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, dword [esp + 8]
sete al
mov dword [edi], eax
mov ecx, dword [esp + 0x6c]
pop esi
xor ecx, esp
mov eax, 1
call fcn.0043f03d
add esp, 0x6c
ret

Function at 0x401b40
Capabilities:
Hash data with md5

Disassembly:
sub esp, 0x64
mov eax, dword [0x476cd4]
xor eax, esp
mov dword [esp + 0x5c], eax
xor eax, eax
push esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
push edi
lea eax, [esp + 8]
mov edi, ecx
push eax
mov dword [esp + 0xc], 0x67452301
mov dword [esp + 0x10], 0xefcdab89
mov dword [esp + 0x14], 0x98badcfe
mov dword [esp + 0x18], 0x10325476
call fcn.00403c70
add esp, 4
test eax, eax
jne 0x401b9e
pop edi
pop esi
mov ecx, dword [esp + 0x5c]
xor ecx, esp
call fcn.0043f03d
add esp, 0x64
ret
lea esi, [esp + 8]
mov ecx, ebx
call fcn.00404fc0
mov ecx, dword [esp + 0x64]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.0043f03d
add esp, 0x64
ret

Function at 0x401bc0
Capabilities:
Hash data using sha256

Disassembly:
sub esp, 0x74
mov eax, dword [0x476cd4]
xor eax, esp
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x78]
xor ecx, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
push edi
lea ecx, [esp + 8]
push ecx
push eax
mov dword [esp + 0x10], 0x6a09e667
mov dword [esp + 0x14], 0xbb67ae85
mov dword [esp + 0x18], 0x3c6ef372
mov dword [esp + 0x1c], 0xa54ff53a
mov dword [esp + 0x20], 0x510e527f
mov dword [esp + 0x24], 0x9b05688c
mov dword [esp + 0x28], 0x1f83d9ab
mov dword [esp + 0x2c], 0x5be0cd19
call fcn.00403d50
add esp, 8
test eax, eax
jne 0x401c3f
pop edi
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0043f03d
add esp, 0x74
ret
mov eax, esi
lea edi, [esp + 8]
call fcn.00404b00
mov ecx, dword [esp + 0x74]
pop edi
xor ecx, esp
mov eax, 1
call fcn.0043f03d
add esp, 0x74
ret

Function at 0x4025d0
Capabilities:
Read file on windows

Disassembly:
push ecx
push 0
lea eax, [esp + 4]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4025fb
push 0x46c82c
mov eax, 0x46c82c
call fcn.00405a60
add esp, 4
xor eax, eax
pop ecx
ret
mov eax, 1
cmp esi, dword [esp]
je 0x402614
push 0x46c82c
call fcn.00405ad0
add esp, 4
xor eax, eax
pop ecx
ret
Function at 0x402eb0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
mov eax, dword [0x476cd4]
xor eax, esp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x38]
push ebx
push ebp
xor ebx, ebx
push esi
mov esi, ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ebx
cmp eax, ebx
jne 0x402ee3
mov dword [esp + 0x10], 0xffffffff
jmp 0x402ee9
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
push ebx
push ebx
push ebp
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x402f17
push 0x46c82c
mov eax, 0x46c82c
call fcn.00405a60
add esp, 4
jmp 0x402ff7
push 0
lea edx, [esp + 0x1c]
push edx
push 8
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402f47
push 0x46c82c
mov eax, 0x46c82c
call fcn.00405a60
add esp, 4
jmp 0x402ff7
mov eax, 8
cmp dword [esp + 0x18], eax
je 0x402f69
mov eax, 1
push 0x46c82c
call fcn.00405ad0
add esp, 4
jmp 0x402ff7
cmp dword [esp + 0x40], ebx
je 0x402fa5
mov ebx, eax
cmp dword [esp + 0x10], eax
jae 0x402f8b
mov eax, 5
push 0x46c82c
call fcn.00405ad0
add esp, 4
jmp 0x402ff7
mov ecx, dword [esp + 0x24]
mov dx, word [esp + 0x28]
mov dword [esi], ecx
mov cx, word [esp + 0x2a]
mov word [esi + 4], dx
mov word [esi + 6], cx
jmp 0x402fef
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x10]
jbe 0x402fb3
mov ebx, esi
jmp 0x402f77
mov edx, dword [esp + 0x38]
xor ebx, ebx
push ebx
push ebx
push ebp
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x402fdc
push 0x46c82c
mov eax, 0x46c82c
call fcn.00405a60
add esp, 4
jmp 0x402ff7
mov ecx, dword [esp + 0x20]
mov edx, edi
call fcn.004025d0
test eax, eax
je 0x402ff7
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x403001
mov dword [eax], ebx
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043f03d
add esp, 0x28
ret
Function at 0x4038e0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
mov ebx, eax
mov eax, dword [ebx]
mov esi, dword [ebx + 0x18]
lea ecx, [esp + 0x10]
push ecx
xor edi, edi
push eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x403922
push 0x46c82c
mov eax, 0x46c82c
call fcn.00405a60
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov edi, dword [esp + 0x10]
mov ecx, dword [ebx + 0xb4]
xor edx, edx
sub edi, esi
mov esi, dword [esp + 0x14]
sbb esi, edx
sub edi, 0x298
sbb esi, edx
xor eax, eax
cmp esi, eax
jl 0x4039e7
jg 0x403952
cmp edi, ecx
jb 0x4039e7
mov ebx, dword [ebx]
push 0
push 0
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x403980
push 0x46c82c
mov eax, 0x46c82c
call fcn.00405a60
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x10]
push eax
push 0x298
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403965
cmp dword [esp + 0xc], 0x298
je 0x4039c1
push 0x46c82c
mov eax, 1
call fcn.00405ad0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4039ce
mov dword [eax], edi
mov dword [eax + 4], esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4039f4
mov edx, 1
mov word [eax], dx
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4039f4
xor ecx, ecx
mov word [eax], cx
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0xc
ret
Function at 0x4042a0
Capabilities:
Get storage device properties

Disassembly:
sub esp, 0x1c
mov eax, dword [0x476cd4]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
push ebp
xor ebp, ebp
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], ebp
cmp eax, ebp
je 0x4043e0
cmp dword [esp + 0x28], ebp
je 0x4043e0
push ebx
push 0x2800
call fcn.00440be1
mov ebx, eax
add esp, 4
cmp ebx, ebp
jne 0x404303
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebx
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.0043f03d
add esp, 0x1c
ret
push esi
push edi
xor edi, edi
jmp 0x404310
push edi
push str..PhysicalDrive_d
mov ecx, 0x2800
call fcn.00402460
add esp, 8
push ebp
push 0x80
push 3
push ebp
push 3
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4043b6
xor eax, eax
push 0x2800
push ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
push ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
call fcn.0043f440
add esp, 0xc
push ebp
lea eax, [esp + 0x18]
push eax
push 0x2800
push ebx
push 0xc
lea ecx, [esp + 0x30]
push ecx
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4043a9
mov eax, dword [ebx + 0x18]
cmp eax, ebp
jbe 0x4043a9
mov edx, dword [esp + 0x18]
add eax, ebx
push eax
mov eax, dword [esp + 0x38]
push edx
push str.DISKID:
call fcn.00404020
add esp, 0xc
mov dword [esp + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], ebp
jne 0x4043c0
inc edi
cmp edi, 0x10
jl 0x404310
push ebx
call fcn.0043efaf
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebx
pop ebp
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.0043f03d
add esp, 0x1c
ret
mov ecx, dword [esp + 0x1c]
pop ebp
xor ecx, esp
or eax, 0xffffffff
call fcn.0043f03d
add esp, 0x1c
ret
Function at 0x404490
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
xor esi, esi
push edi
xor edi, edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], esi
cmp dword [esp + 0x30], esi
je 0x4044ca
cmp dword [esp + 0x34], esi
je 0x4044ca
push 0x200
call fcn.00440be1
mov ebx, eax
add esp, 4
cmp ebx, esi
jne 0x4044d5
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
lea eax, [esp + 0x14]
push eax
push 0x20119
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionNetworkCards
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404634
mov edx, dword [esp + 0x14]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push esi
push esi
push esi
push esi
lea ecx, [esp + 0x20]
push ecx
push ebx
push esi
push edx
mov dword [esp + 0x30], 0x100
call ebp
test eax, eax
jne 0x4045ca
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40452d
mov eax, 0x80000002
lea ecx, [esp + 0x1c]
push ecx
push 0x20119
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4045a3
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x20]
lea eax, [ebx + 4]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push str.ServiceName
push edx
mov dword [esp + 0x38], 1
mov dword [esp + 0x28], 0x200
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404598
mov eax, ebx
mov dword [ebx], 0x5c2e5c5c
call fcn.00404400
cmp edx, edi
jb 0x404598
ja 0x404592
cmp eax, dword [esp + 0x24]
jbe 0x404598
mov dword [esp + 0x24], eax
mov edi, edx
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x14]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push ebx
inc esi
push esi
push edx
mov dword [esp + 0x30], 0x100
call ebp
test eax, eax
je 0x404520
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
ja 0x4045e0
cmp dword [esp + 0x24], 0
jbe 0x404634
mov ecx, dword [esp + 0x24]
push edi
push ecx
push str._012I64X
mov ecx, 0x200
call fcn.00402460
add esp, 0xc
test eax, eax
jne 0x404619
push ebx
mov dword [esp + 0x1c], 0xffffffff
call fcn.0043efaf
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
push ebx
push edx
push str.MAC:
call fcn.00404020
add esp, 0xc
mov dword [esp + 0x18], eax
push ebx
call fcn.0043efaf
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x406ea0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x88
push 0xffffffffffffffff
push 0x462ccb
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x476cd4]
xor eax, ebp
mov dword [ebp + 0x84], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [0x47ad34], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.1830B7BD_F7A3_4c4d_989B_C004DE465EDE
push str._s__u
mov ecx, 0x41
lea ebx, [ebp]
call fcn.00406c20
add esp, 0xc
xor eax, eax
mov word [ebp + 0x80], ax
xor ebx, ebx
xor esi, esi
lea ecx, [ebp]
push ecx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov dword [ebp - 0x14], edi
cmp edi, ebx
je 0x406ffa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x406f44
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 4], ebx
call fcn.00406c90
cmp eax, ebx
je 0x406f5a
mov dword [0x47ad34], eax
jmp 0x406fdb
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp eax, ebx
je 0x406f75
push 0x5c0
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x20], esi
mov byte [ebp - 4], 1
cmp esi, ebx
je 0x406f89
push edi
push esi
call fcn.00407320
jmp 0x406f8b
xor eax, eax
mov byte [ebp - 4], bl
mov dword [0x47ad34], eax
cmp eax, ebx
jne 0x406fac
mov dword [ebp - 0x1c], 1
push 0x472f3c
lea edx, [ebp - 0x1c]
push edx
call fcn.0043e7f6
mov esi, 1
mov dword [ebp - 0x24], esi
push eax
call fcn.00406d60
add esp, 4
test eax, eax
jne 0x406fd6
mov dword [ebp - 0x18], 3
push 0x472f3c
lea eax, [ebp - 0x18]
push eax
call fcn.0043e7f6
mov eax, dword [0x47ad34]
inc dword [eax + 0x5bc]
mov dword [ebp - 4], 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp esi, ebx
jne 0x406ffa
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x47ad34
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x84]
xor ecx, ebp
call fcn.0043f03d
add ebp, 0x88
mov esp, ebp
pop ebp
ret
Function at 0x4070e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x462c70
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x476cd4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ecx, dword [0x47ad34]
xor edi, edi
cmp ecx, edi
jne 0x40712b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 4]
cmp eax, 0xffffffff
jne 0x407138
mov dword [ebp - 0x14], edi
jmp 0x407150
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
cmp eax, edi
jne 0x4071f6
mov ecx, dword [0x47ad34]
mov eax, dword [ecx]
cmp eax, edi
je 0x407117
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x407117
mov dword [ebp - 4], edi
mov ebx, 0x47ad34
call fcn.00407210
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, edi
jne 0x40718e
mov dword [ebp - 0x18], 1
push 0x472f3c
lea eax, [ebp - 0x18]
push eax
call fcn.0043e7f6
mov ecx, dword [0x47ad34]
mov eax, dword [ecx + 4]
cmp eax, 0xffffffff
je 0x4071a8
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, edi
jne 0x4071bd
mov dword [ebp - 0x1c], 4
push 0x472f3c
lea edx, [ebp - 0x1c]
push edx
call fcn.0043e7f6
mov dword [ebp - 4], 0xffffffff
jmp 0x4071e2
mov eax, dword [0x47ad34]
mov eax, dword [eax]
test eax, eax
je 0x4071f4
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407210
Capabilities:
Print debug messages

Disassembly:
sub esp, 8
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov ecx, dword [eax + 0x5b0]
add eax, 8
mov dword [eax + 0x5b0], ecx
cmp ecx, eax
jne 0x40723d
xor ecx, ecx
jmp 0x407249
mov edx, dword [ecx + 0x5a8]
mov dword [eax + 0x5b0], edx
push esi
mov esi, ecx
test ecx, ecx
je 0x4072fd
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_OpenThread]
mov eax, dword [esi]
cmp dword [esp + 0x10], eax
jne 0x407270
mov dword [esp + 0xc], esi
jmp 0x4072d0
push eax
push 1
push 0x40
call edi
test eax, eax
jne 0x4072c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4072bc
mov eax, dword [esi + 0x5ac]
mov ecx, dword [esi + 0x5a8]
mov dword [eax + 0x5a8], ecx
mov edx, dword [esi + 0x5a8]
mov eax, dword [esi + 0x5ac]
mov dword [edx + 0x5ac], eax
call ebp
test eax, eax
je 0x4072d0
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4072d0
push 0x46cf50
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4072d0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx]
mov esi, dword [eax + 0x5b8]
add eax, 8
cmp esi, eax
je 0x4072f3
mov ecx, dword [esi + 0x5a8]
mov dword [eax + 0x5b0], ecx
test esi, esi
jne 0x407262
mov eax, dword [esp + 0xc]
pop edi
pop ebp
test eax, eax
jne 0x407311
mov ecx, dword [ebx]
add ecx, 8
call fcn.004074a0
test eax, eax
je 0x407311
mov edx, dword [esp + 8]
mov dword [eax], edx
pop esi
add esp, 8
ret

Function at 0x407320
Capabilities:
Allocate thread local storage

Disassembly:
push 0xffffffffffffffff
push 0x462c4b
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x476cd4]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov edi, dword [esp + 0x1c]
lea esi, [edi + 8]
push 0x5a0
lea eax, [esi + 8]
push 0
mov dword [edi], 0
mov dword [edi + 4], 0xffffffff
push eax
mov dword [esi], 0
call fcn.0043f440
add esp, 0xc
mov dword [esi + 0x5ac], esi
mov dword [esi + 0x5a8], esi
mov dword [esi + 0x5b0], esi
mov dword [esp + 0x14], 0
mov dword [edi + 0x5bc], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
jne 0x4073b8
push 0x472f3c
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x28], 2
call fcn.0043e7f6
mov ecx, dword [esp + 0x20]
mov dword [edi], ecx
mov dword [esp + 0x14], 0xffffffff
mov eax, edi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 8