joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bc6f2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x668ce8]
jne 0x4bc6fc
repz ret
jmp fcn.004bf56d

Function at 0x4bfeff
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004bb5c6
and dword [ebp - 4], 0
cmp dword [0x66a11c], 0
mov ebx, eax
jne 0x4bffb0
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4c0061
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4c0061
push eax
call fcn.004bb554
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x66a11c], eax
call esi
push eax
call fcn.004bb554
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x66a120], eax
call esi
push eax
call fcn.004bb554
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x66a124], eax
call esi
push eax
call fcn.004bb554
pop ecx
mov dword [0x66a12c], eax
test eax, eax
je 0x4bffb0
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004bb554
pop ecx
mov dword [0x66a128], eax
mov eax, dword [0x66a128]
cmp eax, ebx
je 0x4c0008
cmp dword [0x66a12c], ebx
je 0x4c0008
push eax
call fcn.004bb5cf
push dword [0x66a12c]
mov esi, eax
call fcn.004bb5cf
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4c0008
test edi, edi
je 0x4c0008
call esi
test eax, eax
je 0x4bffff
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4bffff
test byte [ebp - 0xc], 1
jne 0x4c0008
or dword [ebp + 0x10], 0x200000
jmp 0x4c0041
mov eax, dword [0x66a120]
cmp eax, ebx
je 0x4c0041
push eax
call fcn.004bb5cf
pop ecx
test eax, eax
je 0x4c0041
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4c0041
mov eax, dword [0x66a124]
cmp eax, ebx
je 0x4c0041
push eax
call fcn.004bb5cf
pop ecx
test eax, eax
je 0x4c0041
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x66a11c]
call fcn.004bb5cf
pop ecx
test eax, eax
je 0x4c0061
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4c0063
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4c1260
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [0x66814c], 0
mov byte [0x668150], 0
mov dword [0x668140], 0xb84
mov dword [0x668144], 0xfffff5e8
mov dword [0x668148], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov eax, dword [0x668148]
mov ecx, eax
mov dl, cl
mov ecx, dword [ebp - 0x18]
mov byte [ecx + eax], dl
mov dword [0x668140], 0xd78
mov dword [0x668144], 0x25f2
mov eax, dword [0x668148]
add eax, 1
mov dword [0x668148], eax
cmp eax, 0x100
jl 0x4c12aa
jmp 0x4c13b7
mov eax, 0x100
mov dword [0x668154], 0
mov dword [0x668140], 0xe4f
mov ecx, dword [0x66814c]
mov edx, dword [0x668148]
mov esi, dword [ebp - 0x18]
movzx edi, byte [esi + edx]
add edi, ecx
mov dword [ebp - 0x1c], eax
mov eax, edx
xor edx, edx
mov ecx, dword [ebp - 0x10]
div ecx
mov ebx, dword [ebp - 0x14]
movzx edx, byte [ebx + edx]
add edi, edx
mov dword [0x668154], edi
mov eax, edi
cdq
mov edi, dword [ebp - 0x1c]
idiv edi
mov dword [0x66814c], edx
mov dword [0x668140], 0x4f9
mov edx, dword [0x668148]
mov cl, byte [esi + edx]
mov byte [0x668150], cl
mov dword [0x668140], 0x673
mov edx, dword [0x66814c]
mov cl, byte [esi + edx]
mov edx, dword [0x668148]
mov byte [esi + edx], cl
mov cl, byte [0x668150]
mov edx, dword [0x66814c]
mov byte [esi + edx], cl
mov dword [0x668144], 0x9ad
mov dword [0x668140], 0x47
mov edx, dword [0x668148]
add edx, 1
mov dword [0x668148], edx
cmp edx, 0x100
jl 0x4c12e8
jmp 0x4c13c6
mov dword [0x668148], 0
jmp 0x4c12e8
mov dword [0x668144], 0xfe4
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4c1400
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x64
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
call fcn.004c13e0
xor ecx, ecx
mov dword [0x668140], 0x1ebd
mov edx, ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x3c], ecx
jmp 0x4c14a3
mov dword [0x668140], 0x14
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x44]
mov dword [esp + 8], ecx
call fcn.004c19c0
xor eax, eax
mov ecx, dword [0x668140]
add ecx, 0xffffe836
mov dword [0x668140], ecx
mov ecx, dword [ebp - 0x40]
add ecx, 0xf31fc
mov edx, dword [ebp - 0x30]
mov dword [edx], ecx
mov dword [edx + 4], 0x140a00
mov ecx, dword [ebp - 0x40]
add ecx, 0xec2ef
mov dword [edx + 8], ecx
mov dword [edx + 0xc], 0x1f60
mov ecx, dword [0x668140]
add ecx, 0x175d
mov dword [0x668140], ecx
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
lea edx, str._n_n11
imul esi, eax, 0x6c
mov edi, edx
add edi, esi
add edi, 0x68
mov esi, dword [edi]
imul edi, eax, 0x6c
add edx, edi
add edx, 0x50
movzx edx, word [edx]
xor edx, esi
add edx, ecx
add eax, 1
cmp eax, 0x391
mov ecx, edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x3c], eax
jne 0x4c14a3
lea eax, [0x4c5444]
mov ecx, 0xe
lea edx, [ebp - 0x2c]
mov esi, dword [0x668144]
add esi, 0x206c
mov dword [0x668140], esi
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], 0xe
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x4c], ecx
call fcn.004c1d40
mov dword [0x668140], 0xd10
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.004c0fd0
mov ecx, eax
mov dword [0x668160], eax
mov eax, esp
mov edx, dword [ebp - 0x44]
mov dword [eax + 4], edx
mov dword [eax + 0xc], 4
mov dword [eax + 8], 0x1000
mov dword [eax], 0
call ecx
sub esp, 0x10
xor ecx, ecx
mov edx, dword [0x668140]
add edx, 0xfffff45e
mov dword [0x668144], edx
mov edx, ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
lea edx, str._n_n11
imul esi, eax, 0x6c
mov edi, edx
add edi, esi
add edi, 0x68
mov esi, dword [edi]
imul edi, eax, 0x6c
mov ebx, edx
add ebx, edi
add ebx, 0x4c
mov edi, dword [ebx]
imul ebx, eax, 0x6c
add edx, ebx
add edx, 0x50
movzx edx, word [edx]
xor edx, esi
mov esi, dword [ebp - 0x40]
add esi, ecx
mov dword [esp], esi
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x60], edx
call fcn.004c1940
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x5c]
add eax, ecx
mov edx, dword [ebp - 0x58]
add edx, 1
cmp edx, 0x391
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], edx
je 0x4c142d
jmp 0x4c1583
Function at 0x4c1750
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [0x668148], 0
mov dword [0x66814c], 0
mov dword [0x668158], 0
mov edi, dword [0x668140]
add edi, 0xbd5
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], edi
xor eax, eax
mov ecx, dword [ebp - 0x20]
mov dword [0x668144], ecx
mov dword [0x668140], 0x7be
mov edx, dword [ebp - 0x10]
cmp edx, 0
mov dword [ebp - 0x24], eax
je 0x4c18ba
mov eax, dword [ebp - 0x24]
mov ecx, 0x100
mov dword [0x668140], 0x21d9
mov edx, dword [0x668148]
add edx, 1
mov dword [ebp - 0x28], eax
mov eax, edx
cdq
idiv ecx
mov dword [0x668148], edx
mov dword [0x668144], 0x59b
mov esi, dword [0x66814c]
mov edi, dword [ebp - 0x1c]
movzx edx, byte [edi + edx]
add edx, esi
mov eax, edx
cdq
idiv ecx
mov dword [0x66814c], edx
mov ecx, dword [0x668148]
mov bl, byte [edi + ecx]
mov byte [0x668150], bl
mov bl, byte [edi + edx]
mov byte [edi + ecx], bl
mov dword [0x668140], 0x8d8
mov bl, byte [0x668150]
mov ecx, dword [0x66814c]
mov byte [edi + ecx], bl
mov ecx, dword [0x668140]
add ecx, 0x469
mov dword [0x668140], ecx
mov ecx, dword [0x668148]
movzx ecx, byte [edi + ecx]
mov edx, dword [0x66814c]
movzx edx, byte [edi + edx]
add edx, ecx
and edx, 0xff
mov dword [0x668158], edx
mov dword [0x668140], 0x644
mov bl, byte [edi + edx]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
movzx esi, byte [ecx + edx]
mov dword [esp], esi
movzx esi, bl
mov dword [esp + 4], esi
call fcn.00401000
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
mov byte [ecx + edx], al
add edx, 1
mov esi, dword [ebp - 0x10]
cmp edx, esi
mov dword [ebp - 0x24], edx
jne 0x4c17c5
mov dword [0x668140], 0x1819
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4c18d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x668144]
add eax, 0xffffe575
mov dword [ebp - 4], eax
lea eax, [fcn.004c18d0]
mov ecx, dword [ebp - 4]
mov dword [0x668140], ecx
mov dword [ebp - 8], eax
jmp 0x4c1920
mov eax, dword [ebp - 0xc]
add eax, 0xfffff000
and eax, 0xfffff000
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jmp 0x4c1920
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x3c]
cmp dword [eax + ecx], 0x4550
je 0x4c192f
jmp 0x4c18f7
mov eax, dword [ebp - 8]
cmp word [eax], 0x5a4d
mov dword [ebp - 0xc], eax
je 0x4c190f
jmp 0x4c18f7
mov eax, dword [ebp - 0xc]
add esp, 0x10
pop ebp
ret
Function at 0x4c1ba0
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], 0
mov dword [0x668140], 0x27
mov eax, dword fs:[0x30]
mov dword [ebp - 4], eax
xor ecx, ecx
mov dword [0x668140], 0xf46
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x10]
mov edx, dword [edx + 0x3c]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ecx
jmp 0x4c1c28
mov eax, dword [ebp - 0x14]
add esp, 0x28
pop ebp
ret
xor eax, eax
mov dword [0x668140], 0x1c56
mov dword [ebp - 0x14], eax
jmp 0x4c1be0
mov dword [0x668140], 0x6ba
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp word [eax + ecx*2 - 0xe], 0x6c
sete dl
mov byte [ebp - 0x19], dl
mov eax, 1
mov cl, byte [ebp - 0x19]
test cl, 1
mov dword [ebp - 0x14], eax
jne 0x4c1be0
jmp 0x4c1be8
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
cmp word [ecx + eax*2], 0
mov edx, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edx
je 0x4c1c98
jmp 0x4c1c70
mov dword [0x668144], 0xffffdde0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff6
shl eax, 1
mov ecx, dword [ebp - 0xc]
add ecx, eax
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
cmp word [eax], 0x64
je 0x4c1cfc
jmp 0x4c1be8
mov eax, dword [0x668140]
mov ecx, dword [ebp - 0x20]
add ecx, 1
add eax, 0x1d61
mov dword [0x668140], eax
cmp ecx, 0x104
mov eax, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], ecx
jl 0x4c1c28
mov eax, dword [ebp - 0x24]
mov dword [0x668144], 0x1039
mov ecx, dword [ebp - 0xc]
cmp word [ecx + eax*2 - 0x1a], 0x6c
mov dword [ebp - 0x18], eax
jne 0x4c1be8
mov eax, dword [0x668144]
add eax, 0xfffff822
mov dword [0x668140], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp word [eax + ecx*2 - 0x18], 0x6f
jne 0x4c1be8
mov dword [0x668140], 0x1b9
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp word [eax + ecx*2 - 0x16], 0x61
je 0x4c1c40
jmp 0x4c1be8
mov dword [0x668140], 0x56e
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp word [eax + ecx*2 - 0x12], 0x64
jne 0x4c1be8
mov dword [0x668140], 0x1bf0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
cmp word [eax + ecx*2 - 0x10], 0x6c
je 0x4c1bf9
jmp 0x4c1be8
Function at 0x401300
Capabilities:
Terminate process

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x20
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
push dword [ebp - 4]
mov byte [ebp - 8], 0
push dword [ebp - 8]
push dword [ebp - 8]
call fcn.00401360
add esp, 0xc
mov ecx, eax
call fcn.00403630
push 0x10
push eax
lea ecx, [ebx + 8]
call fcn.00403f70
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x1337
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4063f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 2
push 0
push ebx
mov dword [ebp - 4], ecx
call fcn.0040d722
add esp, 0xc
test eax, eax
jne 0x40647a
push ebx
call fcn.0040ce7c
mov esi, eax
add esp, 4
test esi, esi
js 0x40647a
jne 0x40642c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esi + 1]
push 0x41a1fc
push eax
call fcn.004093ed
mov edi, eax
add esp, 8
test edi, edi
jne 0x40644f
lea eax, [edi - 2]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push 0
push ebx
mov byte [edi + esi], 0
call fcn.0040d722
add esp, 0xc
push ebx
push esi
push 1
push edi
call fcn.0040da79
add esp, 0x10
cmp eax, esi
je 0x406488
push edi
call fcn.004092f0
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
push eax
push edi
call fcn.00404cc0
push edi
mov esi, eax
call fcn.004092f0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x406810
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 2
push 0
push ebx
mov dword [ebp - 4], ecx
call fcn.0040d722
add esp, 0xc
test eax, eax
jne 0x40689a
push ebx
call fcn.0040ce7c
mov esi, eax
add esp, 4
test esi, esi
js 0x40689a
jne 0x40684c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esi + 1]
push 0x41a1fc
push eax
call fcn.004093ed
mov edi, eax
add esp, 8
test edi, edi
jne 0x40686f
lea eax, [edi - 2]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push 0
push ebx
mov byte [edi + esi], 0
call fcn.0040d722
add esp, 0xc
push ebx
push esi
push 1
push edi
call fcn.0040da79
add esp, 0x10
cmp eax, esi
je 0x4068a8
push edi
call fcn.004092f0
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
push eax
push edi
call fcn.004072f0
push edi
mov esi, eax
call fcn.004092f0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x409ca8
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00419630
mov eax, dword [0x421040]
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.0040f402
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x40cc54
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x40cdb0
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00419580
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 + 0x421ff0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0040f5d1
mov ecx, dword [esi*4 + 0x421ff0]
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 0x40cda9
cmp eax, dword [ecx + edi + 0x24]
jne 0x40cda9
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 0x40cda9
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040f5d1
add esp, 0x14
test edx, edx
jl 0x40cda9
jg 0x40cd1f
test eax, eax
jb 0x40cda9
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x40cda9
jl 0x40cd39
cmp dword [ebp - 0x1008], eax
ja 0x40cda9
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x40cd57
test ebx, ebx
je 0x40cd90
cmp ecx, edi
jae 0x40cd90
mov al, byte [ecx]
cmp al, 0xd
jne 0x40cd71
lea eax, [edi - 1]
cmp ecx, eax
jae 0x40cd7d
cmp byte [ecx + 1], 0xa
jne 0x40cd7d
inc ecx
jmp 0x40cd7d
movzx eax, al
movsx eax, byte [eax + 0x421240]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x40cd57
cmp edx, ebx
jne 0x40cd57
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x40cdae
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004092e2
leave
ret
Function at 0x40fc76
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 + 0x421ff0]
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 0x40fcb6
cmp byte [ebx], 0xa
jne 0x40fcb6
or byte [edi + eax + 0x28], 4
jmp 0x40fcbb
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 0x40fdba
mov dl, byte [eax]
cmp dl, 0x1a
je 0x40fd9d
inc eax
cmp dl, 0xd
je 0x40fce7
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x40fd0d
cmp eax, ecx
jae 0x40fd1b
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 0x40fccf
jmp 0x40fdba
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 0x40fd98
cmp dword [ebp - 0x10], 0
je 0x40fd98
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x421ff0]
test byte [eax + edi + 0x28], 0x48
je 0x40fd72
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x40fd5d
mov byte [esi], dl
jmp 0x40fd6e
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x421ff0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x40fdba
cmp byte [ebp - 1], 0xa
jne 0x40fd81
cmp esi, ebx
jne 0x40fd81
mov byte [esi], 0xa
jmp 0x40fdb9
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040f5ef
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40fdba
mov byte [esi], 0xd
jmp 0x40fdb9
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x421ff0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x40fdb7
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x40fdba
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40fdc3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x421ff0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40fe09
cmp word [ebx], dx
jne 0x40fe09
or byte [eax + edi + 0x28], 4
jmp 0x40fe0e
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x40ff71
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x40ff51
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x40fe4f
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x40fe85
cmp eax, edx
jae 0x40fe93
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x40fe2a
jmp 0x40ff71
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ff4c
cmp dword [ebp - 0x18], 0
je 0x40ff4c
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x421ff0]
test byte [eax + edi + 0x28], 0x48
je 0x40ff22
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x40fee6
mov word [esi], cx
jmp 0x40ff1d
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x421ff0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x421ff0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x421ff0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x40ff71
pop eax
cmp word [ebp - 4], ax
jne 0x40ff32
cmp esi, ebx
jne 0x40ff32
mov word [esi], ax
jmp 0x40ff6e
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040f5ef
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x40ff71
push 0xd
pop eax
jmp 0x40ff2d
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x421ff0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x40ff6b
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x40ff71
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x410b2c
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ba20
push 0x41ba18
push str.FlsAlloc
push 0x1f
call fcn.00410a48
mov esi, eax
add esp, 0x10
test esi, esi
je 0x410b60
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a14c]
call esi
jmp 0x410b66
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x410baa
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ba30
push 0x41ba28
push str.FlsGetValue
push 0x21
call fcn.00410a48
mov esi, eax
add esp, 0x10
test esi, esi
je 0x410be1
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a14c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x410be9
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ba38
push 0x41ba30
push str.FlsSetValue
push 0x22
call fcn.00410a48
mov esi, eax
add esp, 0x10
test esi, esi
je 0x410c23
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41a14c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x413661
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 0x4136fe
push ebx
push esi
call fcn.0041362a
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.004135be
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4136ab
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4136fd
push edi
push eax
call fcn.004119f0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4136cb
call fcn.004108f5
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4136fc
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004135be
add esp, 0x20
test eax, eax
jne 0x4136ea
push edi
call fcn.004108f5
jmp 0x4136f2
push ebx
call fcn.004108f5
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