joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51caf4
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51cd4e
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x28]
mov edx, 0x24
call fcn.00520e10
lea eax, [ebp - 0x28]
push eax
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [ebp - 0x14]
mov dword [0x534214], eax
mov eax, dword [ebp - 0xc]
mov dword [0x534218], eax
mov eax, dword [ebp - 0x24]
mov dword [0x53421c], eax
mov eax, dword [0x535830]
cmp dword [eax], 2
sete byte [0x5339ac]
push 0x51cd5c
call sub.kernel32.dll_GetModuleHandleA_2
lea edx, [ebp - 4]
call fcn.0051f4d0
xor eax, eax
mov dword [ebp - 0x2c], eax
cmp byte [0x5339ac], 0
jne 0x51cb83
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 4]
call fcn.0051f614
test al, al
je 0x51cb83
mov eax, dword [ebp - 0x4c]
mov dword [0x538ec8], eax
jmp 0x51cb8a
xor eax, eax
mov dword [0x538ec8], eax
call fcn.0051c228
and eax, 0x7f
cmp eax, 0x1a
ja case.0x51cb9b.0
jmp dword [eax*4 + 0x51cba2]
mov byte [0x533998], 1
jmp case.0x51cb9b.0
mov byte [0x53399c], 1
jmp case.0x51cb9b.0
mov byte [0x5339a0], 1
jmp case.0x51cb9b.0
mov byte [0x5339a4], 1
jmp case.0x51cb9b.0
mov byte [0x5339a8], 1
jmp case.0x51cb9b.0
mov byte [0x5339b0], 1
mov byte [0x5339b4], 1
jmp case.0x51cb9b.0
mov byte [0x5339b0], 1
mov byte [0x5339b8], 1
jmp case.0x51cb9b.0
mov byte [0x5339b0], 1
mov byte [0x5339b8], 1
mov byte [0x5339bc], 1
jmp case.0x51cb9b.0
mov byte [0x5339c0], 1
jmp case.0x51cb9b.0
mov byte [0x5339c4], 1
jmp case.0x51cb9b.0
mov byte [0x5339c8], 1
jmp case.0x51cb9b.0
mov byte [0x5339cc], 1
jmp case.0x51cb9b.0
mov byte [0x5339d0], 1
jmp case.0x51cb9b.0
mov byte [0x5339d4], 1
jmp case.0x51cb9b.0
mov byte [0x5339d8], 1
jmp case.0x51cb9b.0
mov byte [0x5339dc], 1
jmp case.0x51cb9b.0
mov byte [0x5339e0], 1
jmp case.0x51cb9b.0
mov byte [0x5339e4], 1
jmp case.0x51cb9b.0
mov byte [0x5339e8], 1
jmp case.0x51cb9b.0
mov byte [0x5339ec], 1
jmp case.0x51cb9b.0
mov byte [0x5339f0], 1
jmp case.0x51cb9b.0
mov byte [0x5339f4], 1
jmp case.0x51cb9b.0
mov byte [0x5339f8], 1
jmp case.0x51cb9b.0
mov byte [0x5339fc], 1
jmp case.0x51cb9b.0
mov byte [0x533a00], 1
jmp case.0x51cb9b.0
mov byte [0x533a04], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51cd55
lea eax, [ebp - 4]
call fcn.00404744
ret

Function at 0x51f0ac
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x51f110
push dword fs:[edx]
mov dword fs:[edx], esp
push 6
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.004049c4
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00409da0
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f117
lea eax, [ebp - 0xc]
call fcn.00404744
ret
Function at 0x51f614
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x51f6ca
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
mov eax, esi
call fcn.00404c14
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
jbe 0x51f6b4
lea eax, [ebp - 0x10]
mov edx, edi
call fcn.00404da4
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
push eax
push edi
mov eax, dword [ebp - 0xc]
push eax
mov eax, esi
call fcn.00404c14
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x51f6b4
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x51f6dc
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x51f6b4
cmp dword [ebp - 8], 0x34
jne 0x51f6b4
mov bl, 1
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov esi, eax
mov edi, edx
mov ecx, 0xd
rep movsd dword es:[edi], dword [esi]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f6d1
lea eax, [ebp - 0x10]
call fcn.00404744
ret

Function at 0x5203a4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x520435
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x535830]
cmp dword [eax], 2
jne 0x5203e4
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
push edi
push esi
push ebx
call sub.advapi32.dll_RegQueryValueExW
mov ebx, eax
jmp 0x520417
lea eax, [ebp - 8]
mov edx, esi
call fcn.00404fbc
mov edx, dword [ebp - 8]
lea eax, [ebp - 4]
call fcn.004049dc
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
push edi
mov eax, dword [ebp - 4]
call fcn.00404c14
push eax
push ebx
call sub.advapi32.dll_RegQueryValueExA_1
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52043c
lea eax, [ebp - 8]
call fcn.00404e64
lea eax, [ebp - 4]
call fcn.00404744
ret

Function at 0x5208d4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [esi], eax
xor eax, eax
mov dword [ebp - 8], eax
push 0x20019
lea eax, [ebp - 8]
push eax
mov eax, edi
call fcn.00404c14
mov edx, eax
mov eax, ebx
call fcn.005200f0
mov edx, eax
xor ecx, ecx
mov eax, ebx
call fcn.0052034c
test eax, eax
sete al
mov ebx, eax
test bl, bl
je 0x520946
push 0
push 0
push esi
push 0
mov eax, dword [ebp - 4]
call fcn.00404c14
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
sete bl
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov eax, ebx
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4
Function at 0x521c54
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push ebx
xor eax, eax
push ebp
push 0x521d43
push dword fs:[eax]
mov dword fs:[eax], esp
mov bl, 1
mov eax, dword [ebp + 8]
add eax, 0xfffffbff
push eax
push 0
push 0
push 0x1c
push 0
call sub.SHFolder.dll_SHGetFolderPathA
test eax, eax
jne 0x521d28
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
add edx, 0xfffffbff
mov ecx, 0x401
call fcn.004049c4
mov eax, dword [ebp - 4]
call fcn.0040a1b8
test al, al
jne 0x521d28
mov eax, dword [ebp + 8]
add eax, 0xfffffbff
push eax
push 0
push 0
push 0x23
push 0
call sub.SHFolder.dll_SHGetFolderPathA
test eax, eax
jne 0x521d28
lea eax, [ebp - 8]
mov edx, dword [ebp + 8]
add edx, 0xfffffbff
mov ecx, 0x401
call fcn.004049c4
mov eax, dword [ebp - 8]
call fcn.0040a1b8
test al, al
jne 0x521d28
mov eax, dword [ebp + 8]
add eax, 0xfffffbff
push eax
push 0
push 0
push 0x2e
push 0
call sub.SHFolder.dll_SHGetFolderPathA
test eax, eax
jne 0x521d28
lea eax, [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, 0xfffffbff
mov ecx, 0x401
call fcn.004049c4
mov eax, dword [ebp - 0xc]
call fcn.0040a1b8
test al, al
jne 0x521d28
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x521d4a
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00404768
ret
Function at 0x42211b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x42215a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42215a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42215a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x42215a
cmp dword [ecx + 0x74], 0xe
jbe 0x42215a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4347a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4347cd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4347cd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
nop
nop
nop
nop
pop eax
nop
add eax, 0x403ac5
nop
nop
sub eax, 0x403a6b
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x42e030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x42e01e
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x4032de
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte cs:[ebp - 0x5e], 0x35
mov byte [ebp - 0x5d], 0x24
mov byte [ebp - 0x5c], 0x22
mov byte [ebp - 0x5b], 0x35
mov byte [ebp - 0x5a], 0x41
call fcn.00402ece
push eax
push esi
call dword [eax + 0x56]
push dword [ebp + 8]
call fcn.00402e83
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x2c], bl
pop ebp
aam 0x50
mov byte [ebp - 0x2b], bl
mov byte [ebp - 0x2a], 0xd4
mov byte [ebp - 0x29], bl
mov byte [ebp - 0x28], 0x67
mov byte [ebp - 0x27], 0x44
mov byte [ebp - 0x26], 0x4a
mov byte [ebp - 0x25], 0x4f
mov byte [ebp - 0x24], 0x67
mov byte [ebp - 0x23], 0x42
mov byte [ebp - 0x22], 0x49
fimul word [ecx - 0x3a]
inc ebp
fistp word [ecx - 0x3a]
inc ebp
loopne 0x403359
mov byte [ebp - 0x1f], 0x59
mov byte [ebp - 0x1e], 0x52
mov byte [ebp - 0x1d], 0x6a
mov byte [ebp - 0x1c], 0x2b
call fcn.00402ece
push eax
push esi
push dword [ebp + 8]
call fcn.00402e83
add esp, 0x30
mov dword [ebp - 0xb8], eax
call fcn.00402ebe
cmp bh, al
je 0x4032c9
popfd
jl 0x403343
invalid
invalid

Function at 0x403305
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte cs:[ebp - 0x5e], 0x35
mov byte [ebp - 0x5d], 0x24
mov byte [ebp - 0x5c], 0x22
mov byte [ebp - 0x5b], 0x35
mov byte [ebp - 0x5a], 0x41
call fcn.00402ece
push eax
push esi
call dword [eax + 0x56]
push dword [ebp + 8]
call fcn.00402e83
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x2c], bl
pop ebp
aam 0x50
mov byte [ebp - 0x2b], bl
mov byte [ebp - 0x2a], 0xd4
mov byte [ebp - 0x29], bl
mov byte [ebp - 0x28], 0x67
mov byte [ebp - 0x27], 0x44
mov byte [ebp - 0x26], 0x4a
mov byte [ebp - 0x25], 0x4f
mov byte [ebp - 0x24], 0x67
mov byte [ebp - 0x23], 0x42
mov byte [ebp - 0x22], 0x49
fimul word [ecx - 0x3a]
inc ebp
fistp word [ecx - 0x3a]
inc ebp
loopne 0x403359
mov byte [ebp - 0x1f], 0x59
mov byte [ebp - 0x1e], 0x52
mov byte [ebp - 0x1d], 0x6a
mov byte [ebp - 0x1c], 0x2b
call fcn.00402ece
push eax
push esi
push dword [ebp + 8]
call fcn.00402e83
add esp, 0x30
mov dword [ebp - 0xb8], eax
call fcn.00402ebe
cmp bh, al
je 0x4032c9
popfd
jl 0x403343
invalid
invalid

Function at 0x404303
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov eax, dword [ebp - 0x700]
inc eax
mov dword [ebp - 0x700], eax
cmp dword [ebp - 0x700], 5
jge 0x404314
mov eax, dword [ebp - 0x700]
movsx eax, byte [ebp + eax - 0x394]
movsx ecx, byte [ebp - 0x24]
xor eax, ecx
mov ecx, dword [ebp - 0x700]
mov byte [ebp + ecx - 0x394], al
mov eax, dword [ebp - 0x700]
movsx eax, byte [ebp + eax - 0x394]
not eax
mov ecx, dword [ebp - 0x700]
mov byte [ebp + ecx - 0x394], al
jmp 0x4042be
invalid
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
pop eax
nop
nop
nop
add eax, 0x40729f
nop
sub eax, 0x407245
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43201e
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x4971b6
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4c6b10]
jne 0x4971c0
repz ret
jmp fcn.0049bc1d

Function at 0x499f00
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4c6b10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00494532
and dword [ebp - 0x14], 0
cmp dword [0x4c9cbc], 0
mov dword [ebp - 0x18], eax
jne 0x499fb3
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x49a05b
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4a4030
push ebx
call edi
test eax, eax
je 0x49a05b
mov esi, dword [fcn.00490bb0]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x4c9cbc], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x4c9cc0], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x4c9cc4], eax
call edi
push eax
call esi
mov dword [0x4c9ccc], eax
test eax, eax
je 0x499fb3
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4c9cc8], eax
mov eax, dword [0x4c9cc8]
mov ecx, dword [ebp - 0x18]
mov esi, dword [fcn.00490bb4]
cmp eax, ecx
je 0x49a00c
cmp dword [0x4c9ccc], ecx
je 0x49a00c
push eax
call esi
push dword [0x4c9ccc]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x49a00c
test ebx, ebx
je 0x49a00c
call edi
test eax, eax
je 0x49a003
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x49a003
test byte [ebp - 8], 1
jne 0x49a00c
or dword [ebp + 0x10], 0x200000
jmp 0x49a03f
mov eax, dword [0x4c9cc0]
cmp eax, dword [ebp - 0x18]
je 0x49a03f
push eax
call esi
test eax, eax
je 0x49a03f
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x49a03f
mov eax, dword [0x4c9cc4]
cmp eax, dword [ebp - 0x18]
je 0x49a03f
push eax
call esi
test eax, eax
je 0x49a03f
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4c9cbc]
call esi
test eax, eax
je 0x49a05b
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x49a05d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004971b6
leave
ret

Function at 0x42e001
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..rdata
nop
mov ebx, 0x407ef8
nop
nop
mov ecx, 0x638832a7
test eax, eax
nop
nop
nop
nop
nop
je 0x42e04e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x42e024
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42cd70
nop
nop
mov ecx, 0x37c97464
nop
nop
nop
test eax, eax
nop
nop
nop
je 0x42e084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x42e06c
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x40c070
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x4f804c
call sym._EnterCriticalSection_4
mov ebx, dword [0x4f8044]
sub esp, 4
test ebx, ebx
je 0x40c0bb
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x40c0b4
test esi, esi
je 0x40c0b4
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40c090
mov dword [esp], 0x4f804c
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x40c2a0
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
lea esi, [esp + 0x24]
lea ebx, [eax + 0x40]
mov dword [esp + 4], 1
mov dword [esp + 0xc], ebx
mov dword [esp], str.Mingw_runtime_failure:_n
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x40c2f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, edx
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x3c
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x40c3c4
mov eax, dword [esp + 0x28]
cmp eax, 0x40
je 0x40c32e
cmp eax, 4
jne 0x40c350
test esi, esi
je 0x40c342
xor eax, eax
movzx ecx, byte [edi + eax]
mov byte [ebx + eax], cl
add eax, 1
cmp eax, esi
jb 0x40c334
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
lea ebp, [esp + 0x10]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov ecx, dword [esp + 0x28]
test esi, esi
je 0x40c38f
xor edx, edx
movzx eax, byte [edi + edx]
mov byte [ebx + edx], al
add edx, 1
cmp edx, esi
jb 0x40c381
cmp ecx, 0x40
je 0x40c342
cmp ecx, 4
je 0x40c342
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.0040c2a0
lea esi, [esi]
Function at 0x415c50
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp + 4], 0
mov dword [esp], 2
call sym._setlocale
test eax, eax
je 0x415d24
mov dword [esp], eax
mov esi, eax
mov ebx, esp
call sym._strlen
lea edx, [eax + 1]
add eax, 0x10
shr eax, 4
shl eax, 4
call fcn.00417ba0
sub esp, eax
lea eax, [esp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._memcpy
mov dword [esp + 4], 0x4b4ea4
mov dword [esp], 2
mov esi, eax
call sym._setlocale
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._strcmp
test eax, eax
je 0x415d30
mov dword [esp + 4], esi
mov dword [esp], 2
call sym._setlocale
mov eax, esi
mov dword [esp + 4], 0x2e
mov dword [esp], eax
call sym._strchr
test eax, eax
je 0x415d20
add eax, 1
mov dword [esp], eax
call sym._atoi
mov edi, eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._GetCPInfo_8
sub esp, 8
test eax, eax
je 0x415d20
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x415d70
xor edi, edi
mov esp, ebx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.LC_ALL
call sym._getenv
test eax, eax
jne 0x415ce2
mov dword [esp], str.LC_CTYPE
call sym._getenv
test eax, eax
jne 0x415ce2
mov dword [esp], str.LANG
call sym._getenv
test eax, eax
jne 0x415ce2
mov eax, esi
jmp 0x415ce2
mov esp, ebx
jmp 0x415d24

Function at 0x417f20
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
call sym._GetLastError_0
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call sym._SetLastError_4
mov eax, ebx
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x417f50
Capabilities:
Set thread local storage value

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
test eax, eax
je 0x417f78
xor eax, eax
add esp, 0x1c
ret
add esp, 0x1c
jmp sym._GetLastError_0
Function at 0x41c160
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0x1c
mov dword [0x4f8a64], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffff
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateSemaphoreW_16
sub esp, 0x10
mov dword [0x4f8a68], eax
call sym._TlsAlloc_0
cmp eax, 0xffffffff
je 0x41c1c8
mov dword [esp + 4], dbg.emutls_destroy
mov dword [esp], eax
mov dword [0x4f8a60], eax
call sym.___mingwthr_key_dtor
test eax, eax
jne sym._emutls_init.cold
add esp, 0x1c
ret
call sym._GetLastError_0
jmp 0x41c1b8
Function at 0x41c1d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebp, dword [0x4f8030]
mov esi, dword [esp + 0x40]
test ebp, ebp
jne 0x41c1f8
mov eax, dword [esi + 8]
test eax, eax
je 0x41c250
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esi + 8]
test edi, edi
je 0x41c260
mov ebx, dword [0x4f8a60]
call sym._GetLastError_0
mov dword [esp], ebx
mov ebp, eax
call sym._TlsGetValue_4
sub esp, 4
mov ebx, eax
mov dword [esp], ebp
call sym._SetLastError_4
sub esp, 4
test ebx, ebx
je 0x41c2f0
mov ebp, dword [ebx]
cmp ebp, edi
jb 0x41c340
lea ebx, [ebx + edi*4]
mov eax, dword [ebx]
test eax, eax
jne 0x41c1ec
mov eax, esi
call sym._emutls_alloc
mov dword [ebx], eax
jmp 0x41c1ec
mov eax, esi
call sym._emutls_alloc
mov dword [esi + 8], eax
jmp 0x41c1ec
mov edi, dword [0x4f8030]
test edi, edi
je 0x41c3c8
mov ebx, dword [0x4af0a8]
test ebx, ebx
je 0x41c398
mov dword [esp], 0x4f8a64
call sym._InterlockedIncrement_4
sub esp, 4
test eax, eax
jne 0x41c40b
mov edi, dword [esi + 8]
test edi, edi
je 0x41c3d3
mov eax, dword [0x4f8030]
test eax, eax
je 0x41c1ff
mov dword [esp], 0x4f8a64
call sym._InterlockedDecrement_4
sub esp, 4
test eax, eax
js 0x41c1ff
mov eax, dword [0x4f8a68]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._ReleaseSemaphore_12
sub esp, 0xc
jmp 0x41c1ff
lea eax, [edi + 0x21]
mov dword [esp + 4], 4
lea ebp, [edi + 0x20]
mov dword [esp], eax
call sym._calloc
mov ebx, eax
test eax, eax
je sym.___emutls_get_address.cold
mov dword [eax], ebp
mov eax, dword [0x4f8a60]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._TlsSetValue_8
sub esp, 8
test eax, eax
jne 0x41c236
call sym._GetLastError_0
jmp 0x41c236
lea edx, [ebp + ebp]
cmp edi, edx
jbe 0x41c34b
lea edx, [edi + 0x20]
lea eax, [edx*4 + 4]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 0x1c], edx
call sym.___mingw_realloc
mov ebx, eax
test eax, eax
je sym.___emutls_get_address.cold
mov edx, dword [esp + 0x1c]
mov dword [eax], edx
sub edx, ebp
lea eax, [eax + ebp*4 + 4]
shl edx, 2
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._memset
jmp 0x41c312
mov dword [esp], 0x4af0ac
call sym._InterlockedIncrement_4
sub esp, 4
test eax, eax
jne 0x41c3ff
call sym._emutls_init
mov dword [0x4af0a8], 1
mov edx, dword [0x4f8030]
test edx, edx
jne 0x41c27c
mov edi, dword [esi + 8]
test edi, edi
jne 0x41c1ff
mov eax, dword [0x4f8a5c]
lea edi, [eax + 1]
mov dword [0x4f8a5c], edi
mov dword [esi + 8], edi
jmp 0x41c29e
mov dword [esp], 0
call sym._Sleep_4
sub esp, 4
mov ecx, dword [0x4af0a8]
test ecx, ecx
je 0x41c3f0
jmp 0x41c3ba
mov eax, dword [0x4f8a68]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sym._WaitForSingleObject_8
sub esp, 8
test eax, eax
je 0x41c293
mov dword [esp], 0x4f8a64
call sym._InterlockedDecrement_4
sub esp, 4
jmp 0x41c293