joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002a9a6
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
xor ebx, ebx
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
call fcn.1002a8b8
cmp dword [esi], ebx
je 0x1002aa06
push edi
mov edi, ebx
cmp dword [esi + 8], ebx
jbe 0x1002aa05
mov eax, dword [esi]
push dword [eax + edi*4]
push ebx
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x1002a9fc
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push dword [ebp + 8]
mov edx, dword [ebp - 4]
mov ecx, ebx
call fcn.1002a764
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
push 0
pop ebx
cmp edi, dword [esi + 8]
jb 0x1002a9cc
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1002aa0a
Capabilities:
Resume thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x1002aa56
push edi
xor edi, edi
cmp dword [esi + 8], edi
jbe 0x1002aa45
push ebx
mov eax, dword [esi]
push dword [eax + edi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x1002aa3e
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [esi + 8]
jb 0x1002aa1b
pop ebx
push dword [esi]
push 0
push dword [0x1006b4ec]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
ret

Function at 0x1002aa58
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x10067040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
imul esi, ecx, 0x2c
push edi
add esi, dword [0x1006bd50]
mov eax, dword [esi]
mov cl, byte [esi + 0x14]
and cl, 1
lea edi, [eax - 5]
cmove edi, eax
movzx eax, cl
lea ebx, [eax*2 + 5]
lea eax, [ebp - 8]
push eax
push 0x40
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1002aaa2
push 0xa
pop eax
jmp 0x1002aae1
mov byte [edi], 0xe9
mov eax, dword [esi + 4]
sub eax, edi
sub eax, 5
mov dword [edi + 1], eax
test byte [esi + 0x14], 1
je 0x1002aabd
mov eax, dword [esi]
mov word [eax], 0xf9eb
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
or byte [esi + 0x14], 6
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002c4d5
leave
ret
Function at 0x1002b342
Capabilities:
Enumerate files on windows

Disassembly:
push 0x250
mov eax, 0x10050a25
call fcn.1004dee7
mov esi, ecx
push str._Mod_Loader___INFO___Reading_profiles...
call fcn.10001ebd
push esi
lea eax, [ebp - 0x114]
push str._s
push eax
call fcn.10001391
add esp, 0x10
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1002b39e
mov byte [0x1006b877], 1
mov eax, str._Mod_Loader___ERROR__Reading_failed_
jmp 0x1002b4e2
xor ebx, ebx
test byte [ebp - 0x254], 0x10
je 0x1002b4c0
push 1
lea eax, [ebp - 0x228]
push 0x1006124c
push eax
call fcn.1003cfc0
add esp, 0xc
test eax, eax
je 0x1002b4c0
push 2
lea eax, [ebp - 0x228]
push 0x100612ac
push eax
call fcn.1003cfc0
add esp, 0xc
test eax, eax
je 0x1002b4c0
lea ecx, [ebp - 0x228]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002b3f2
sub ecx, edx
cmp ecx, 0x40
jae 0x1002b4ad
push 0x38
call fcn.1002c59d
mov esi, eax
pop ecx
mov dword [ebp - 0x25c], esi
lea eax, [ebp - 0x228]
mov dword [ebp - 4], ebx
push eax
mov ecx, esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
call fcn.10001a54
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x258]
mov dword [esi + 0x10], ebx
mov ecx, 0x10069248
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
push eax
mov dword [esi + 8], 7
mov word [esi + 0xc], 1
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov dword [ebp - 0x258], esi
call fcn.10003890
cmp dword [esi], 0
mov eax, 0x10057334
mov ecx, esi
cmovne eax, dword [esi]
push eax
call fcn.1002bc17
cmp byte [esi + 0xc], 0
mov eax, str.Disabled
push dword [esi + 8]
mov ecx, str.Enabled
cmove ecx, eax
cmp dword [esi], 0
mov eax, 0x10057334
cmovne eax, dword [esi]
push ecx
push eax
push str._Mod_Loader___INFO___Loading__s__s___d_
call fcn.10001ebd
add esp, 0x10
jmp 0x1002b4c0
lea eax, [ebp - 0x228]
push eax
push str._Mod_Loader___INFO___Profile_name_exceeds_64_characters__simplify_the_name_for__s_
call fcn.10001ebd
pop ecx
pop ecx
lea eax, [ebp - 0x254]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1002b3a0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, str._Mod_Loader___INFO___Profiles_reading_done_
push eax
call fcn.10001ebd
pop ecx
call fcn.1004dea5
ret
Function at 0x1002b4ef
Capabilities:
Get common file path

Disassembly:
push 0x144
mov eax, 0x10050a5f
call fcn.1004dee7
cmp byte [0x1006b874], 0
jne 0x1002b5cf
lea eax, [ebp - 0x114]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str._Mod_Loader___INFO___Loading_scripts...
call fcn.10001ebd
mov ebx, dword [0x1006924c]
mov eax, dword [0x10069250]
pop ecx
xor ecx, ecx
mov dword [ebp - 0x118], ecx
lea eax, [ebx + eax*4]
mov dword [ebp - 0x11c], eax
cmp ebx, eax
je 0x1002b5c2
mov edx, dword [ebx]
cmp byte [edx + 0xc], 0
je 0x1002b5b5
lea eax, [ebp - 0x118]
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x128], eax
lea esi, [ebp - 0x128]
lea eax, [ebp - 0x114]
mov dword [ebp - method.std::_Func_impl_no_alloc_class__void___cdecl_openScripts_void_::_8::_lambda_1___void__struct_ModLoader::ModProfile::File__.virtual_0], vtable.std::_Func_impl_no_alloc_class__void___cdecl_openScripts_void_::_8::_lambda_1___void__struct_ModLoader::ModProfile::File__.0
mov dword [ebp - 0x120], eax
lea edi, [ebp - 0x14c]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x150]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x12c], eax
mov dword [ebp - 4], ecx
mov ecx, edx
push eax
call fcn.10001dfe
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x150]
call fcn.10003758
mov eax, dword [ebp - 0x11c]
xor ecx, ecx
add ebx, 4
cmp ebx, eax
jne 0x1002b548
mov ecx, dword [ebp - 0x118]
push ecx
push str._Mod_Loader___INFO____d_scripts_loaded_
call fcn.10001ebd
pop ecx
pop ecx
call fcn.1004dea5
ret
Function at 0x1002b5d5
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 4], ecx
push edi
mov eax, dword [ebx + 8]
mov esi, eax
mov dword [ebp + 8], eax
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1002b5ed
push 0x104
xor edi, edi
mov eax, 0x1006ba30
push edi
push eax
sub esi, ecx
call fcn.1002e260
mov ecx, dword [ebp + 8]
mov edx, 0x1006ba30
add ecx, 0xfffffffc
add esp, 0xc
add ecx, esi
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x1002b61b
mov edx, 0x1006ba30
mov esi, edx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1002b62f
sub esi, ecx
test esi, esi
jle 0x1002b65a
movsx eax, byte [esi + 0x1006ba30]
push eax
call fcn.1003113d
mov byte [esi + 0x1006ba30], al
dec esi
pop ecx
test esi, esi
jg 0x1002b63c
mov edx, 0x1006ba30
mov ecx, str..asi
movzx eax, byte [edx + edi]
cmp al, byte [ecx + edi]
jne 0x1002b6d8
inc edi
cmp edi, 5
jne 0x1002b65f
cmp byte [ebx + 0xc], 0
jne 0x1002b6d8
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x1002b6b5
push str.InitializeASI
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002b693
call eax
push 0x5c
push dword [ebx + 8]
call fcn.1002dc50
inc eax
push eax
push str._Mod_Loader___INFO___Loading__s_plugin...
call fcn.10001ebd
mov esi, dword [ebp - 4]
add esp, 0x10
mov eax, dword [esi]
inc dword [eax]
jmp 0x1002b6cf
mov esi, dword [ebp - 4]
mov eax, dword [esi + 4]
mov eax, dword [eax]
push dword [eax + 4]
push dword [eax]
push str._Mod_Loader___ERROR__Failed_to_load__s_plugin_
call fcn.10001ebd
add esp, 0xc
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x1002b6df
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x364
mov eax, dword [0x10067040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x218]
push esi
push edi
mov esi, ecx
mov edi, edx
push esi
push str._s
push eax
mov dword [ebp - 0x360], esi
call fcn.10001391
add esp, 0xc
lea eax, [ebp - 0x358]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
or ecx, 0xffffffff
mov dword [ebp - 0x35c], eax
cmp eax, ecx
jne 0x1002b74a
push esi
push str._Mod_Loader___ERROR__Cannot_read_files_for__s
call fcn.10001ebd
pop ecx
pop ecx
jmp 0x1002b896
test byte [ebp - 0x358], 0x10
jne 0x1002b82f
cmp byte [ebp - 0x32c], 0x2e
je 0x1002b873
cmp byte [ebp - 0x32b], 0x2e
je 0x1002b873
push 0x10
call fcn.1002c59d
mov esi, eax
xor eax, eax
pop ecx
mov dword [ebp - 0x364], esi
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov byte [esi + 0xc], al
lea eax, [ebp - 0x32c]
push eax
push dword [ebp - 0x360]
lea eax, [ebp - 0x110]
push str._s_s
push eax
call fcn.10001391
mov ecx, dword [ebp - 0x33c]
add esp, 0x10
mov eax, dword [ebp - 0x338]
and dword [esi + 8], 0
mov dword [esi + 4], ecx
lea ecx, [ebp - 0x110]
mov dword [esi], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002b7cd
sub ecx, edx
push 0xffffffffffffffff
add ecx, 1
pop eax
cmovb ecx, eax
push ecx
call fcn.1003cfb2
pop ecx
mov ecx, eax
mov dword [esi + 8], ecx
test ecx, ecx
je 0x1002b7ff
lea edx, [ebp - 0x110]
mov al, byte [edx]
inc edx
mov byte [ecx], al
inc ecx
test al, al
jne 0x1002b7f5
mov ecx, dword [esi + 8]
call fcn.10001b41
mov eax, dword [edi + 4]
test eax, eax
je 0x1002b81c
mov ecx, dword [edi + 0xc]
cmp ecx, dword [edi + 8]
jae 0x1002b81c
mov dword [eax + ecx*4], esi
inc dword [edi + 0xc]
mov eax, dword [esi]
add dword [ebx + 0x28], eax
mov eax, dword [esi + 4]
adc dword [ebx + 0x2c], eax
mov esi, dword [ebp - 0x360]
jmp 0x1002b86d
cmp byte [ebp - 0x32c], 0x2e
je 0x1002b873
cmp byte [ebp - 0x32b], 0x2e
je 0x1002b873
lea eax, [ebp - 0x32c]
push eax
push esi
lea eax, [ebp - 0x110]
push str._s_s
push eax
call fcn.10001391
push 1
push ebx
mov edx, edi
lea ecx, [ebp - 0x110]
call fcn.1002b6df
add esp, 0x18
mov eax, dword [ebp - 0x35c]
lea ecx, [ebp - 0x358]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
mov eax, dword [ebp - 0x35c]
jne 0x1002b74a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002c4d5
leave
ret
Function at 0x1002bc17
Capabilities:
Read .ini file

Disassembly:
push 0x18
mov eax, 0x10050b62
call fcn.1004dee7
mov ebx, ecx
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x24]
xor esi, esi
mov dword [ebp - 0x14], esi
call fcn.1002bbca
push str.profiles.ini
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], esi
push ecx
mov ecx, eax
call fcn.1002af7b
mov ecx, 0x10057334
cmp dword [eax], esi
cmovne ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x14]
call fcn.1002ad6f
push dword [ebp - 0x1c]
call fcn.1002c4e3
push dword [ebp - 0x24]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call fcn.1002c4e3
pop ecx
pop ecx
push 1
push str.Enabled
push edi
lea ecx, [ebp - 0x14]
call fcn.1002aebe
mov esi, dword [ebp - 0x14]
push esi
push 7
push str.Priority
push edi
mov byte [ebx + 0xc], al
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebx + 8], eax
test esi, esi
je 0x1002bca6
push esi
call fcn.100366de
pop ecx
call fcn.1004dea5
ret 4
Function at 0x100301b6
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1004e0b0
mov eax, dword [0x10067040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.1003ec1b
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x100301f8
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10030354
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1004e000
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x1006ae30]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.1003ee2b
mov ecx, dword [esi*4 + 0x1006ae30]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x1003034d
cmp eax, dword [edi + ecx + 0x24]
jne 0x1003034d
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003034d
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1003ee2b
add esp, 0x14
test edx, edx
jl 0x1003034d
jg 0x100302c3
test eax, eax
jb 0x1003034d
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x1003034d
jl 0x100302dd
cmp dword [ebp - 0x1008], eax
ja 0x1003034d
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x100302fb
test ebx, ebx
je 0x10030334
cmp ecx, edi
jae 0x10030334
mov al, byte [ecx]
cmp al, 0xd
jne 0x10030315
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10030321
cmp byte [ecx + 1], 0xa
jne 0x10030321
inc ecx
jmp 0x10030321
movzx eax, al
movsx eax, byte [eax + 0x10067240]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x100302fb
cmp edx, ebx
jne 0x100302fb
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10030352
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1002c4d5
leave
ret
Function at 0x1003661b
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x10067040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x10051fd8
push esi
call fcn.10043bea
pop ecx
pop ecx
test eax, eax
jne 0x10036649
xor al, al
jmp 0x100366c6
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.1003635e
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x10036683
push dword [ebp - 0x210]
call fcn.100366de
xor al, al
jmp 0x100366c4
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10036689
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x100366a9
push edx
call fcn.10036551
pop ecx
test al, al
je 0x10036674
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x100366b7
mov bl, 1
push dword [ebp - 0x210]
call fcn.100366de
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1002c4d5
leave
ret
Function at 0x1003f59c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0x1006ae30]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1003f5dc
cmp byte [ebx], 0xa
jne 0x1003f5dc
or byte [eax + edi + 0x28], 4
jmp 0x1003f5e1
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x1003f6df
mov al, byte [edx]
cmp al, 0x1a
je 0x1003f6c1
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x1003f610
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x1003f635
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x1003f63f
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x1003f5f2
jmp 0x1003f6df
push 0
lea eax, [ebp - 0xc]
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 0x1003f6bc
cmp dword [ebp - 0xc], 0
je 0x1003f6bc
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x1006ae30]
test byte [eax + edi + 0x28], 0x48
je 0x1003f696
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1003f681
mov byte [esi], dl
jmp 0x1003f692
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1006ae30]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1003f6df
cmp byte [ebp - 1], 0xa
jne 0x1003f6a5
cmp esi, ebx
jne 0x1003f6a5
mov byte [esi], 0xa
jmp 0x1003f6de
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1003ee49
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1003f6df
mov byte [esi], 0xd
jmp 0x1003f6de
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x1006ae30]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1003f6db
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1003f6df
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1003f6e8
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x1006ae30]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1003f72b
cmp word [esi], dx
jne 0x1003f72b
or byte [edi + eax + 0x28], 4
jmp 0x1003f730
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x1003f883
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x1003f863
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x1003f772
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1003f7a8
cmp eax, edx
jae 0x1003f7b4
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x1003f74a
jmp 0x1003f883
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003f85f
cmp dword [ebp - 0x14], 0
je 0x1003f85f
mov eax, dword [ebx*4 + 0x1006ae30]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x1003f837
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x1003f800
mov word [esi], cx
jmp 0x1003f833
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x1006ae30]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x1006ae30]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x1006ae30]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x1003f883
pop ebx
cmp word [ebp - 4], bx
jne 0x1003f848
cmp esi, dword [ebp + 0xc]
jne 0x1003f848
mov word [esi], bx
jmp 0x1003f880
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1003ee49
add esp, 0x10
cmp word [ebp - 4], bx
je 0x1003f883
push 0xd
jmp 0x1003f87c
mov ecx, dword [ebx*4 + 0x1006ae30]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1003f87a
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1003f883
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10041cfc
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10053c98
push 0x10053c90
push str.FlsAlloc
push 0x1e
call fcn.10041b3d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10041d30
push dword [ebp + 8]
mov ecx, esi
call dword [0x10051264]
call esi
jmp 0x10041d36
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10041d7a
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10053ca8
push 0x10053ca0
push str.FlsGetValue
push 0x20
call fcn.10041b3d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10041db1
push dword [ebp + 8]
mov ecx, esi
call dword [0x10051264]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10044776
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.100445e7

Function at 0x10044c1c
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.10044b9e
Function at 0x100467a4
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 0x10046841
push ebx
push esi
call fcn.1004676d
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.100466b6
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x100467ee
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10046840
push edi
push eax
call fcn.1004190c
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1004680e
call fcn.1004168e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1004683f
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100466b6
add esp, 0x20
test eax, eax
jne 0x1004682d
push edi
call fcn.1004168e
jmp 0x10046835
push ebx
call fcn.1004168e
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 0x10046844
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x10046855
pop esi
ret
push ebx
push edi
push esi
call fcn.1004676d
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.1004190c
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1004687d
push ebx
push esi
push edi
call fcn.1002f750
add esp, 0xc
push 0
call fcn.1004168e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x10046c41
Capabilities:
Set environment variable

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