joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000ef30
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, 0x1c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x100101c0
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [esi]
test eax, eax
je 0x1000f03d
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x1000ef81
cmp dword [eax + 4], 0
jne 0x1000f038
mov eax, dword [esi]
test eax, eax
je 0x1000f05b
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x1000f074
test eax, eax
jne 0x1000efeb
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], esi
movzx eax, byte [0x1005e089]
push 4
push 0xc
call fcn.10004c40
add esp, 8
test eax, eax
je 0x1000f09c
mov ecx, dword [ebp - 0x20]
movsd xmm0, qword [ebp - 0x28]
mov dword [eax + 8], ecx
movsd qword [eax], xmm0
mov ecx, dword [esi]
test ecx, ecx
je 0x1000f088
dec ecx
push eax
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, esi
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x1000f003
mov ecx, dword [edx]
mov dword [edx], 0
test ecx, ecx
je 0x1000f005
mov ecx, dword [edx + 4]
jmp 0x1000f005
xor ecx, ecx
mov esi, dword [eax + 4]
mov edx, dword [eax + 8]
test esi, esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edx
mov dword [eax + 4], 1
mov dword [eax + 8], ecx
je 0x1000f038
test edx, edx
je 0x1000f038
lock dec dword [edx]
jne 0x1000f038
lea ecx, [ebp - 0x24]
push ecx
mov esi, eax
call fcn.10001ac0
mov eax, esi
add esp, 4
add eax, 8
jmp 0x1000f076
push esi
call fcn.10034670
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x1000ef77
jmp 0x1000ef81
push esi
call fcn.10034670
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x1000ef9c
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
mov esi, eax
call fcn.10034670
add esp, 4
mov ecx, eax
mov eax, esi
jmp 0x1000efdf
mov dword [ebp - 0x10], 0
push 0xc
push 4
call fcn.10034ec0
add esp, 8
ud2
Function at 0x1000f8e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10010210
lea eax, [ebp - 0x18]
mov ebx, dword [ebp + 0x10]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
movzx eax, byte [0x1005e089]
push 4
push 8
call fcn.10004c40
add esp, 8
test eax, eax
je 0x1000f9c2
mov esi, eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov dword [esi], ebx
mov dword [esi + 4], ecx
push 0
push 0x10000
push esi
push 0x1000fa40
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x1000f95d
mov dword [edi + 4], eax
mov byte [edi], 4
jmp 0x1000f9af
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x24], eax
push eax
mov dword [ebp - 0x20], ecx
call dword [ecx]
add esp, 4
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
mov eax, dword [ecx + 4]
test eax, eax
je 0x1000f994
push dword [ecx + 8]
push eax
push dword [ebp - 0x24]
call fcn.10004c50
add esp, 0xc
push 4
push 8
push dword [ebp - 0x28]
call fcn.10004c50
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [edi], 0
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, edi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], 0
push 8
push 4
call fcn.10034ec0
add esp, 8
ud2
Function at 0x1000fe10
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, 0x1c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10010240
mov esi, ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [0x1005d6a0]
test eax, eax
je 0x1000ff27
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x1000fe63
cmp dword [eax + 4], 0
jne 0x1000ff22
mov eax, dword [0x1005d6a0]
test eax, eax
je 0x1000ff49
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x1000ff66
test eax, eax
jne 0x1000fed8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0x1005d6a0
movzx eax, byte [0x1005e089]
push 4
push 0xc
call fcn.10004c40
add esp, 8
test eax, eax
je 0x1000ff92
mov ecx, dword [ebp - 0x20]
movsd xmm0, qword [ebp - 0x28]
mov dword [eax + 8], ecx
movsd qword [eax], xmm0
mov ecx, dword [0x1005d6a0]
test ecx, ecx
je 0x1000ff7a
dec ecx
push eax
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, edi
test esi, esi
je 0x1000feed
mov ecx, dword [esi]
mov dword [esi], 0
test ecx, ecx
je 0x1000feef
mov ecx, dword [esi + 4]
jmp 0x1000feef
xor ecx, ecx
mov esi, dword [eax + 4]
mov edx, dword [eax + 8]
test esi, esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edx
mov dword [eax + 4], 1
mov dword [eax + 8], ecx
je 0x1000ff22
test edx, edx
je 0x1000ff22
lock dec dword [edx]
jne 0x1000ff22
lea ecx, [ebp - 0x24]
push ecx
mov esi, eax
call fcn.10001930
mov eax, esi
add esp, 4
add eax, 8
jmp 0x1000ff68
push 0x1005d6a0
call fcn.10034670
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x1000fe59
jmp 0x1000fe63
push 0x1005d6a0
call fcn.10034670
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x1000fe81
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1005d6a0
mov edi, eax
call fcn.10034670
add esp, 4
mov ecx, eax
mov eax, edi
jmp 0x1000fecc
mov dword [ebp - 0x10], 0
push 0xc
push 4
call fcn.10034ec0
add esp, 8
ud2
Function at 0x1000ffd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
mov eax, dword [0x1005d6b0]
mov esi, ecx
test eax, eax
je 0x1000fff6
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x1001000f
cmp byte [eax + 4], 0
je 0x1001000f
add eax, 5
pop esi
pop edi
ret
push 0x1005d6b0
call fcn.10034670
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x1000ffea
mov eax, dword [0x1005d6b0]
test eax, eax
je 0x10010085
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x1001009e
test eax, eax
jne 0x10010061
movzx eax, byte [0x1005e089]
push 4
push 8
call fcn.10004c40
add esp, 8
test eax, eax
je 0x100100b8
mov dword [eax], 0x1005d6b0
mov byte [eax + 4], 0
mov ecx, dword [0x1005d6b0]
test ecx, ecx
je 0x100100a3
dec ecx
push eax
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, edi
xor ecx, ecx
test esi, esi
je 0x10010076
cmp byte [esi], 0
mov byte [esi], 0
movzx edx, byte [esi + 1]
cmove edx, ecx
mov ecx, edx
lea edx, [eax + 5]
mov byte [eax + 4], 1
mov byte [eax + 5], cl
mov eax, edx
pop esi
pop edi
ret
push 0x1005d6b0
call fcn.10034670
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x10010025
xor eax, eax
pop esi
pop edi
ret
push 0x1005d6b0
mov edi, eax
call fcn.10034670
add esp, 4
mov ecx, eax
mov eax, edi
jmp 0x10010055
push 8
push 4
call fcn.10034ec0
int3
Function at 0x100124e0
Capabilities:
Read 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 0x10012524
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 0x1001252a
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_NtReadFile]
cmp eax, 0x103
jne 0x1001255f
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
cmp eax, 0xc0000011
jne 0x1001256f
mov dword [esi + 4], 0
jmp 0x10012581
cmp eax, 0x103
je 0x1001259b
test eax, eax
js 0x1001258c
mov eax, dword [esp + 0xc]
mov dword [esi + 4], eax
mov byte [esi], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov byte [esi], 0
mov dword [esi + 4], eax
jmp 0x10012584
lea eax, [esp + 4]
mov dword [esp + 0x18], 0x1003d78c
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.10010cc0
add esp, 0xc
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
call fcn.10002f90
mov ecx, 7
int 0x29
ud2
Function at 0x10012600
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 0x10012644
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 0x1001264a
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 0x10012686
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
cmp eax, 0x103
je 0x100126ab
test eax, eax
js 0x10012695
mov eax, dword [esp + 0xc]
mov dword [esi + 4], eax
mov al, 4
jmp 0x100126a1
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], 0x1003d78c
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.10010cc0
add esp, 0xc
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
call fcn.10002f90
mov ecx, 7
int 0x29
ud2
Function at 0x100163e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x448
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10017390
mov esi, 0x200
lea eax, [ebp - 0x18]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 2
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x20], 0
cmp esi, 0x201
jae 0x10016470
jmp 0x1001645e
jbe 0x100164f6
cmp esi, 0x201
jae 0x10016470
mov dword [ebp - 0x30], 0x200
lea ebx, [ebp - 0x454]
mov edi, esi
jmp 0x100164a1
mov edi, dword [ebp - 0x34]
sub esi, edi
je 0x10016495
mov dword [ebp - 0x10], 0
push esi
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.10034d90
add esp, 0xc
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], 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 0x100164c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10016563
cmp esi, edi
jne 0x10016450
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10016582
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x1001645e
jmp 0x10016470
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], 0
cmp esi, eax
ja 0x1001659f
lea eax, [ebp - 0x44]
push esi
push ebx
push eax
call fcn.10014fa0
add esp, 0xc
movsd xmm0, qword [ebp - 0x44]
movsd xmm1, qword [ebp - 0x3c]
mov esi, dword [ebp + 8]
movsd qword [ebp - 0x4c], xmm1
movsd qword [ebp - 0x54], xmm0
movsd qword [esi + 8], xmm1
movsd qword [esi], xmm0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x1001654d
add eax, eax
push 2
push eax
push dword [ebp - 0x24]
call fcn.10004c50
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x448
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 - 0x28]
test eax, eax
jne 0x1001653d
jmp 0x1001654d
mov dword [ebp - 0x10], 0
push 0x1003e70c
push 0x28
push str.internal_error:_entered_unreachable_code
call fcn.10035230
add esp, 0xc
jmp 0x100165ae
push 0x1003e6d4
push eax
push esi
call fcn.100350b0
add esp, 0xc
ud2
Function at 0x100165e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x100173a0
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
mov esi, 0x200
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 2
mov edx, dword fs:[0]
mov dword [ebp - 0x18], edx
mov dword fs:[0], ecx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x20], 0
mov eax, dword [eax + 4]
mov dword [ebp - 0x38], eax
cmp esi, 0x201
jae 0x10016670
jmp 0x1001665e
jbe 0x100166f9
cmp esi, 0x201
jae 0x10016670
mov dword [ebp - 0x30], 0x200
lea ebx, [ebp - 0x458]
mov edi, esi
jmp 0x100166a1
mov edi, dword [ebp - 0x34]
sub esi, edi
je 0x10016695
mov dword [ebp - 0x10], 0
push esi
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.10034d90
add esp, 0xc
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
push ebx
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x100166c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10016766
cmp esi, edi
jne 0x10016650
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10016785
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x1001665e
jmp 0x10016670
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], 0
cmp esi, eax
ja 0x100167a2
lea eax, [ebp - 0x48]
push esi
push ebx
push eax
call fcn.10014fa0
add esp, 0xc
movsd xmm0, qword [ebp - 0x48]
movsd xmm1, qword [ebp - 0x40]
mov esi, dword [ebp + 8]
movsd qword [ebp - 0x50], xmm1
movsd qword [ebp - 0x58], xmm0
movsd qword [esi + 8], xmm1
movsd qword [esi], xmm0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10016750
add eax, eax
push 2
push eax
push dword [ebp - 0x24]
call fcn.10004c50
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x44c
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 - 0x28]
test eax, eax
jne 0x10016740
jmp 0x10016750
mov dword [ebp - 0x10], 0
push 0x1003e70c
push 0x28
push str.internal_error:_entered_unreachable_code
call fcn.10035230
add esp, 0xc
jmp 0x100167b1
push 0x1003e6d4
push eax
push esi
call fcn.100350b0
add esp, 0xc
ud2
Function at 0x10020de0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10020e38
mov esi, dword [esp + 0x18]
lea edi, [edx + eax*2]
xor ebx, ebx
movzx eax, byte [edx + 1]
cmp byte [edx], ch
lea edx, [edx + 2]
lea ebp, [ebx + eax]
jne 0x10020e30
cmp ebx, ebp
ja 0x10020ea5
cmp ebp, dword [esp + 0x1c]
ja 0x10020eb1
add ebx, esi
nop word [eax + eax]
test eax, eax
je 0x10020e32
dec eax
cmp byte [ebx], cl
lea ebx, [ebx + 1]
jne 0x10020e20
jmp 0x10020e8e
ja 0x10020e38
cmp edx, edi
mov ebx, ebp
jne 0x10020df5
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10020e92
mov esi, dword [esp + 0x20]
cmp eax, 1
movzx ecx, cx
mov ebx, esi
lea edi, [esi + eax]
mov al, 1
sbb ebx, 0xffffffff
nop word cs:[eax + eax]
nop
movzx edx, byte [esi]
test dl, dl
jns 0x10020e77
cmp ebx, edi
je 0x10020e9b
movzx esi, byte [ebx]
and edx, 0x7f
inc ebx
shl edx, 8
or edx, esi
mov esi, ebx
sub ecx, edx
js 0x10020e94
xor al, 1
xor ebx, ebx
cmp esi, edi
setne bl
add ebx, esi
cmp esi, edi
jne 0x10020e60
jmp 0x10020e94
xor eax, eax
jmp 0x10020e94
mov al, 1
and al, 1
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1004015c
call fcn.100354c0
push 0x1004016c
push ebp
push ebx
call fcn.100350d0
push 0x1004016c
push dword [esp + 0x20]
push ebp
call fcn.100350b0
Function at 0x1002b1d2
Capabilities:
Parse pe header

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

Function at 0x1002c27f
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100427d0
push 0x100427c8
push str.FlsAlloc
push 0x1f
call fcn.1002c19b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002c2b3
push dword [ebp + 8]
mov ecx, esi
call dword [0x100361b8]
call esi
jmp 0x1002c2b9
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1002c2fd
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100427e0
push 0x100427d8
push str.FlsGetValue
push 0x21
call fcn.1002c19b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002c334
push dword [ebp + 8]
mov ecx, esi
call dword [0x100361b8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x1002c33c
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100427e8
push 0x100427e0
push str.FlsSetValue
push 0x22
call fcn.1002c19b
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1002c376
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x100361b8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1002eb2e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1002ebcb
push ebx
push esi
call fcn.1002eaf7
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.1002ea8b
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1002eb78
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1002ebca
push edi
push eax
call fcn.1002cbef
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1002eb98
call fcn.1002c048
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1002ebc9
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1002ea8b
add esp, 0x20
test eax, eax
jne 0x1002ebb7
push edi
call fcn.1002c048
jmp 0x1002ebbf
push ebx
call fcn.1002c048
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x10030141
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x1005e7c0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10030181
cmp byte [ebx], 0xa
jne 0x10030181
or byte [edi + eax + 0x28], 4
jmp 0x10030186
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x10030285
mov dl, byte [eax]
cmp dl, 0x1a
je 0x10030268
inc eax
cmp dl, 0xd
je 0x100301b2
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x100301d8
cmp eax, ecx
jae 0x100301e6
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x1003019a
jmp 0x10030285
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10030263
cmp dword [ebp - 0x10], 0
je 0x10030263
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1005e7c0]
test byte [eax + edi + 0x28], 0x48
je 0x1003023d
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10030228
mov byte [esi], dl
jmp 0x10030239
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1005e7c0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10030285
cmp byte [ebp - 1], 0xa
jne 0x1003024c
cmp esi, ebx
jne 0x1003024c
mov byte [esi], 0xa
jmp 0x10030284
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10032088
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10030285
mov byte [esi], 0xd
jmp 0x10030284
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1005e7c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10030282
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10030285
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret