joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402140
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x4e0040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 2
mov dword [ebp - 0x130], 0x128
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
lea eax, [ebp - 0x130]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4021b3
mov edi, dword [sym.imp.KERNEL32.dll_Process32Next]
mov ebx, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
nop word [eax + eax]
lea eax, [ebp - 0x10c]
push 0x4053ec
push eax
call ebx
add esp, 8
test eax, eax
je 0x4021cd
lea eax, [ebp - 0x130]
push eax
push esi
call edi
test eax, eax
jne 0x402190
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4053fc
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x4021ea
mov eax, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403a7f
mov esp, ebp
pop ebp
ret

Function at 0x4025b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x4025dc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x402604
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40260a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x402672
jg 0x402621
test esi, esi
je 0x402672
test ecx, ecx
jl 0x40266d
jg 0x40262b
test eax, eax
je 0x40266d
cmp edi, ecx
jg 0x40263f
jl 0x402635
cmp esi, eax
jae 0x40263f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x402675
mov ecx, dword [ebp + 8]
jmp 0x40267f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402699
jg 0x40267f
test esi, esi
je 0x402699
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402699
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4026b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x4026dc
jl 0x4026d0
test ecx, ecx
jne 0x4026dc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x4026f5
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x402743
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x402749
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x402749
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x4027b6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402772
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x4027a4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x4027b6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402780
test edi, edi
je 0x4027b6
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4e0040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x402b60
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x402b9c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x402b9c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x402c73
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x402bc4
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x402bd0
movsx eax, bl
jmp 0x402c08
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x402c32
sub eax, 1
je 0x402c32
sub eax, 2
jne 0x402c73
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402c50
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x402c73
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403a7f
mov esp, ebp
pop ebp
ret 4
Function at 0x4031e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4e0040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40329c
cmp byte [esi + 0x3d], 0
je 0x40329c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40328a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x403251
sub eax, 1
je 0x403255
sub eax, 2
jne 0x40328a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403273
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40328a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a7f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00403a7f
mov esp, ebp
pop ebp
ret

Function at 0x4044c3
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404502
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404502
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404502
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404502
cmp dword [ecx + 0x74], 0xe
jbe 0x404502
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4012d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
sub esp, 0x28
mov eax, dword [ebp + 8]
mov eax, dword [0x41803c]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov ecx, dword [0x418990]
mov eax, dword [0x418994]
xor esi, esi
sub esi, 1
mov edx, ecx
add edx, esi
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete cl
cmp eax, 0xa
setl dl
mov al, cl
and al, dl
xor cl, dl
or al, cl
test al, 1
jne 0x401320
jmp 0x401425
lea ecx, str.input
lea eax, [0x414b86]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040478e
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], 0xfffffffc
mov dword [esp + 8], 2
call fcn.00404b8b
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x10]
mov dword [esp], ecx
mov dword [esp + 4], 4
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
call fcn.0040497a
mov dword [ebp - 0x1c], eax
mov ecx, dword [0x418990]
mov eax, dword [0x418994]
mov edx, ecx
add edx, 0x32ec2be0
sub edx, 1
sub edx, 0x32ec2be0
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete bl
cmp eax, 0xa
setl dh
mov cl, bl
xor cl, 0xff
mov ah, dh
xor ah, 0xff
mov dl, 1
xor dl, 0
mov al, cl
and al, 0
and bl, dl
mov ch, ah
and ch, 0
and dh, dl
or al, bl
or ch, dh
xor al, ch
or cl, ah
xor cl, 0xff
or dl, 0
and cl, dl
or al, cl
test al, 1
jne 0x4013ee
jmp 0x401425
jmp 0x4013f3
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov dword [esp], ecx
mov dword [esp + 4], eax
call section..text
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.00401db2
mov eax, dword [ebp - 0x20]
add esp, 0x28
pop esi
pop ebx
pop ebp
ret
lea ecx, str.input
lea eax, [0x414b86]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040478e
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], 0xfffffffc
mov dword [esp + 8], 2
call fcn.00404b8b
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x10]
mov dword [esp], ecx
mov dword [esp + 4], 4
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
call fcn.0040497a
jmp 0x401320
Function at 0x401490
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov eax, esp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x401d40
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, esp
mov dword [eax], 0xc
call fcn.00401d5a
mov ecx, eax
mov eax, ecx
mov dword [ebp - 0x34], eax
mov eax, ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 0
mov eax, esp
mov dword [eax + 4], 3
mov dword [eax], 2
call fcn.004015d0
sub esp, 8
jmp 0x4014fb
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov eax, esp
mov dword [eax + 4], 0x414b8a
mov dword [eax], 0
call fcn.004017f0
sub esp, 8
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x24]
mov eax, esp
mov dword [eax], ecx
call fcn.004012d0
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov eax, esp
mov dword [eax + 4], ecx
mov dword [eax + 0xc], 0x40
mov dword [eax + 8], 0x1000
mov dword [eax], 0
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
call eax
sub esp, 0x10
mov dword [ebp - 0x2c], eax
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov eax, esp
mov dword [eax + 0xc], esi
mov dword [eax + 4], edx
mov dword [eax], ecx
mov dword [eax + 8], 1
call fcn.0040497a
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x2c]
mov eax, dword [ecx]
mov eax, dword [eax]
mov dword [ebp - 0x10], 0xffffffff
mov edx, esp
mov dword [edx], esi
call eax
sub esp, 4
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
xor eax, eax
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4017f0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x2c
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov dword [ebp - 0x14], eax
mov ecx, dword [0x4189a0]
mov eax, dword [0x4189a4]
mov edx, ecx
add edx, 0xeafafecf
sub edx, 1
sub edx, 0xeafafecf
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete bl
cmp eax, 0xa
setl dh
mov cl, bl
xor cl, 0xff
mov ah, dh
xor ah, 0xff
mov dl, 1
xor dl, 1
mov al, cl
and al, 0xff
and bl, dl
mov ch, ah
and ch, 0xff
and dh, dl
or al, bl
or ch, dh
xor al, ch
or cl, ah
xor cl, 0xff
or dl, 1
and cl, dl
or al, cl
test al, 1
jne 0x40188a
jmp 0x40193c
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [sym.imp.USER32.dll_ShowWindow]
sub esp, 8
mov ecx, dword [ebp - 8]
xor eax, eax
lea eax, str.errr
mov dword [esp], 0
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x10
call dword [sym.imp.USER32.dll_MessageBoxW]
sub esp, 0x10
mov ecx, dword [0x4189a0]
mov eax, dword [0x4189a4]
mov edx, ecx
add edx, 0x9ae4a099
sub edx, 1
sub edx, 0x9ae4a099
imul ecx, edx
and ecx, 1
cmp ecx, 0
sete bl
cmp eax, 0xa
setl dh
mov cl, bl
xor cl, 0xff
mov ah, dh
xor ah, 0xff
mov dl, 1
xor dl, 1
mov al, cl
and al, 0xff
and bl, dl
mov ch, ah
and ch, 0xff
and dh, dl
or al, bl
or ch, dh
xor al, ch
or cl, ah
xor cl, 0xff
or dl, 1
and cl, dl
or al, cl
test al, 1
jne 0x401934
jmp 0x40193c
add esp, 0x2c
pop ebx
pop ebp
ret 8
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [sym.imp.USER32.dll_ShowWindow]
sub esp, 8
mov ecx, dword [ebp - 8]
xor eax, eax
lea eax, str.errr
mov dword [esp], 0
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x10
call dword [sym.imp.USER32.dll_MessageBoxW]
sub esp, 0x10
jmp 0x40188a

Function at 0x403677
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4036b6
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4036b6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4036b6
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4036b6
cmp dword [ecx + 0x74], 0xe
jbe 0x4036b6
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x405021
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040c470
mov eax, dword [0x41803c]
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.0040b0dd
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x405063
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4051bf
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0040c3c0
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 + 0x419180]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0040c1f2
mov ecx, dword [esi*4 + 0x419180]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x4051b8
cmp eax, dword [ecx + edi + 0x24]
jne 0x4051b8
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4051b8
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040c1f2
add esp, 0x14
test edx, edx
jl 0x4051b8
jg 0x40512e
test eax, eax
jb 0x4051b8
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4051b8
jl 0x405148
cmp dword [ebp - 0x1008], eax
ja 0x4051b8
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x405166
test ebx, ebx
je 0x40519f
cmp ecx, edi
jae 0x40519f
mov al, byte [ecx]
cmp al, 0xd
jne 0x405180
lea eax, [edi - 1]
cmp ecx, eax
jae 0x40518c
cmp byte [ecx + 1], 0xa
jne 0x40518c
inc ecx
jmp 0x40518c
movzx eax, al
movsx eax, byte [eax + 0x4187a8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x405166
cmp edx, ebx
jne 0x405166
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4051bd
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00401db2
leave
ret

Function at 0x40699d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4126d8
push 0x4126d0
push str.FlsAlloc
push 0x1f
call fcn.00406c80
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4069d1
push dword [ebp + 8]
mov ecx, esi
call dword [section..00cfg]
call esi
jmp 0x4069d7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x406a1b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4126e8
push 0x4126e0
push str.FlsGetValue
push 0x21
call fcn.00406c80
mov esi, eax
add esp, 0x10
test esi, esi
je 0x406a52
push dword [ebp + 8]
mov ecx, esi
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x406a5a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4126f0
push 0x4126e8
push str.FlsSetValue
push 0x22
call fcn.00406c80
mov esi, eax
add esp, 0x10
test esi, esi
je 0x406a94
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40a300
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 0x40a39d
push ebx
push esi
call fcn.0040a3a0
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.0040a204
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40a34a
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40a39c
push edi
push eax
call fcn.00408c9b
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40a36a
call fcn.00407ea1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40a39b
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040a204
add esp, 0x20
test eax, eax
jne 0x40a389
push edi
call fcn.00407ea1
jmp 0x40a391
push ebx
call fcn.00407ea1
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 0x40b77d
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 + 0x419180]
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 0x40b7bd
cmp byte [ebx], 0xa
jne 0x40b7bd
or byte [edi + eax + 0x28], 4
jmp 0x40b7c2
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 0x40b8c1
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40b8a4
inc eax
cmp dl, 0xd
je 0x40b7ee
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40b814
cmp eax, ecx
jae 0x40b822
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 0x40b7d6
jmp 0x40b8c1
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 0x40b89f
cmp dword [ebp - 0x10], 0
je 0x40b89f
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x419180]
test byte [eax + edi + 0x28], 0x48
je 0x40b879
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40b864
mov byte [esi], dl
jmp 0x40b875
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x419180]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40b8c1
cmp byte [ebp - 1], 0xa
jne 0x40b888
cmp esi, ebx
jne 0x40b888
mov byte [esi], 0xa
jmp 0x40b8c0
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c194
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40b8c1
mov byte [esi], 0xd
jmp 0x40b8c0
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x419180]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40b8be
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40b8c1
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret