joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415d4d
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
movzx eax, byte [0x4259e6]
mov ecx, 0xbdb2
xor ax, cx
sub esp, 0xc
mov word [0x4259e4], ax
mov edx, str.loadercode
mov al, byte [0x4259e8]
add al, 0x35
push esi
mov byte [0x4259e6], al
call fcn.004180b5
imul ecx, dword [0x4259e8], 0xc93bb1d8
mov esi, eax
mov dword [0x4259c8], ecx
test esi, esi
je 0x415f3d
movzx edx, byte [0x4259e6]
add edx, 0x240f137d
mov cl, dl
mov dword [0x4259e8], edx
and cl, 0x7d
or dl, 0x2d
movzx eax, cl
push ebx
and eax, 0x47ba4447
mov byte [0x4259e6], cl
push str.Theres_shellcode_to_launch._Gonna_load_it_n
mov dword [0x4259c8], eax
mov byte [0x4259cc], dl
call fcn.004115bb
pop ecx
mov cx, word [0x4259e4]
mov eax, 0xa370
and cx, ax
mov al, byte [0x4259e6]
add al, 0x36
mov word [0x4259e4], cx
mov byte [0x4259cc], al
and cl, 0xe8
lea eax, [ebp - 4]
mov byte [0x4259e6], cl
push eax
push esi
call fcn.00405b40
pop ecx
mov edx, eax
mov ecx, esi
call fcn.0040f780
mov edx, dword [0x4259c8]
mov ebx, eax
mov al, byte [0x4259e4]
pop ecx
mov cl, dl
add al, 0x71
or cl, 0xcd
mov byte [0x4259cc], al
mov byte [0x4259e6], cl
test ebx, ebx
je 0x415f25
movzx eax, al
xor edx, 0x3cca51f6
imul ecx, eax, 0x69b1c2f6
mov eax, dword [ebp - 4]
push edi
mov dword [ebp - 8], eax
mov dword [0x4259c8], edx
sub dl, 0x2e
mov dword [0x4259e8], ecx
mov dword [ebp - 0xc], ebx
mov byte [0x4259e6], dl
lea eax, [ecx + 0x19e1]
xor ecx, ecx
push ecx
push ecx
mov word [0x4259e4], ax
lea eax, [ebp - 0xc]
push eax
push 0x415f40
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
movzx edx, word [0x4259e4]
mov edi, eax
and edx, 0x8760a001
mov dword [0x4259e8], edx
test edi, edi
je 0x415f0a
mov cl, byte [0x4259c8]
and edx, 0xce13edde
movzx eax, byte [0x4259e6]
and cl, 6
mov byte [0x4259cc], cl
mov ecx, 0xc38a
push 0xffffffffffffffff
xor ax, cx
mov dword [0x4259c8], edx
push edi
mov word [0x4259e4], ax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov cx, word [0x4259e4]
movzx eax, cx
xor eax, 0x9972cb6d
mov dword [0x4259c8], eax
movzx eax, cl
imul eax, eax, 0xd1
push edi
mov byte [0x4259e6], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [0x4259c8]
sub al, 0x64
mov byte [0x4259cc], al
or al, 0x44
push ebx
mov byte [0x4259e6], al
call fcn.004056f0
pop ecx
pop edi
imul eax, dword [0x4259e8], 0x521
push esi
mov word [0x4259e4], ax
call fcn.004056f0
pop ecx
pop ebx
pop esi
leave
ret
Function at 0x41b0ee
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20
mov al, byte [0x425b4c]
movaps xmm0, xmmword [0x4239f0]
add al, 0x37
push ebx
push ebp
mov byte [esp + 0xa], al
lea ebp, [esp + 0x18]
push esi
mov esi, 0x80000000
push edi
mov edi, ecx
mov eax, esi
xor ecx, ecx
cpuid
movups xmmword [esp + 0x20], xmm0
mov dword [ebp], eax
mov dword [ebp + 4], ebx
mov dword [ebp + 8], ecx
mov cl, byte [esp + 0x12]
mov dword [ebp + 0xc], edx
mov ebp, dword [esp + 0x20]
movzx edx, cl
sub cl, 0x14
mov al, cl
mov dword [esp + 0x1c], ebp
and al, 0x7d
mov byte [esp + 0x12], cl
mov byte [0x425b4c], al
or edx, 0x22107773
movzx eax, cl
imul eax, eax, 0xc9
mov dword [esp + 0x14], edx
mov dword [0x425b40], edx
mov byte [0x425b4d], cl
mov byte [0x425b3e], al
cmp ebp, esi
jb 0x41b2f2
mov al, byte [0x425b55]
mov byte [esp + 0x13], al
movzx eax, dl
lea ebp, [esp + 0x20]
imul eax, eax, 0x7c
xor ecx, ecx
mov dword [esp + 0x18], eax
mov byte [0x425b3e], al
mov eax, esi
cpuid
mov dword [ebp], eax
mov eax, ebp
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x18]
lea edx, [eax - 0x27]
mov byte [0x425b4c], dl
cmp esi, 0x80000002
jne 0x41b204
mov al, byte [esp + 0x13]
mov cl, 0x2f
or al, 0xcc
xor al, 0x13
mov byte [0x425b3e], al
mov eax, dword [esp + 0x14]
movzx eax, al
imul eax, eax, 0x1f
push 0x10
sub cl, al
movzx eax, cl
imul eax, eax, 0x57
mov byte [0x425b4d], cl
mov byte [0x425b55], al
mov eax, ebp
push eax
push edi
call fcn.00401d70
mov dl, byte [0x425b4d]
add esp, 0xc
mov al, byte [0x425b3e]
mov byte [esp + 0x12], dl
jmp 0x41b268
sub dl, 0x57
cmp esi, 0x80000003
jne 0x41b264
mov cl, byte [esp + 0x12]
or dl, 0xfa
push 0x10
mov byte [0x425b3e], dl
lea eax, [ecx + 0x25]
mov byte [0x425b55], al
mov al, cl
or al, 8
mov byte [0x425b4c], al
movzx eax, cl
imul eax, eax, 0x7935388c
mov dword [0x425b40], eax
lea eax, [esp + 0x24]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00401d70
mov al, byte [0x425b4d]
add esp, 0xc
mov cl, byte [0x425b55]
mov byte [esp + 0x12], al
mov al, byte [0x425b3e]
jmp 0x41b271
mov dl, byte [esp + 0x12]
lea ecx, [edx + 0x65]
mov byte [0x425b55], cl
mov ebp, dword [esp + 0x1c]
lea ebx, [eax - 0x75]
movzx edx, cl
sub edx, 0x20639d7b
mov byte [esp + 0x13], cl
mov byte [0x425b4c], bl
mov dword [esp + 0x14], edx
mov dword [0x425b40], edx
cmp esi, 0x80000004
jne 0x41b2e9
movzx eax, al
sub cl, 0x56
imul eax, eax, 0x7e
or bl, 0xd4
push 0x10
mov byte [0x425b3e], cl
mov byte [0x425b4c], bl
mov byte [0x425b4d], al
lea eax, [esp + 0x24]
push eax
lea eax, [edi + 0x20]
push eax
call fcn.00401d70
mov al, byte [0x425b4d]
add esp, 0xc
mov edx, dword [0x425b40]
mov byte [esp + 0x12], al
mov al, byte [0x425b55]
mov dword [esp + 0x14], edx
mov byte [esp + 0x13], al
inc esi
cmp esi, ebp
jbe 0x41b17d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x4a14f4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4a15cd
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4a15e8
push ebx
push 0x4a15f8
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.0040a768
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.004077c0
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0040a494
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x4a1576
mov ax, 0x83
call fcn.004a1118
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle
call fcn.004a14c8
push 0x1cff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
cmp eax, 1
je 0x4a157f
call fcn.004a14c8
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a15d4
lea eax, [ebp - 4]
call fcn.00409a3c
pop eax
jmp eax

Function at 0x4a16e8
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb4
mov dword [esp], eax
lea esi, [esp + 0x30]
lea eax, [esp + 0xc]
push eax
call sub.kernel32.dll_GetSystemInfo
mov edi, dword [esp]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4a17b1
jmp 0x4a17a5
cmp dword [esi + 0x10], 0x1000
jne 0x4a1793
test byte [esi + 0x15], 1
jne 0x4a1793
mov byte [esp + 4], 0
mov ebp, dword [esi + 0x14]
cmp ebp, 1
je 0x4a1744
cmp ebp, 2
je 0x4a1744
cmp ebp, 0x10
je 0x4a1744
cmp ebp, 0x20
jne 0x4a1760
lea eax, [esp + 8]
push eax
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4a1760
mov byte [esp + 4], 1
xor ebx, ebx
jmp 0x4a1771
mov eax, dword [esi]
add eax, ebx
call fcn.004a16e0
add ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0xc]
jb 0x4a1764
cmp byte [esp + 4], 0
je 0x4a1793
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov edi, dword [esi]
add edi, dword [esi + 0xc]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4a17b1
mov eax, dword [esi + 4]
cmp eax, dword [esp]
je 0x4a1719
add esp, 0x4c
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x8ccb90
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x8cc92e
add eax, esi
mov eax, 0xa126c722
call fcn.008ccbc9
inc esi
or esi, eax
xor dword [edi], edx
sub esi, 0xe7fe31bf
sub esi, esi
inc edi
add esi, 0xb5f9f0ac
cmp edi, ebx
jne fcn.008ccb90
inc esi
sub eax, 0xfd7982a4
ret
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40c7d0
nop
mov ecx, 0x34713a51
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x43204e
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x432024
nop
mov eax, section..data
nop
mov ebx, 0x42f314
nop
mov ecx, 0x3d94067a
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x432084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x43206c
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x410c70
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0x4025e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x70
call sub.MSVBVM60.DLL___vbaChkstk
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x14], 0x401f20
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 1
mov dword [ebp - 4], 2
push 0xffffffffffffffff
call dword [sym.imp.MSVBVM60.DLL___vbaOnError]
mov dword [ebp - 4], 3
call fcn.00404fd8
mov dword [ebp - 0x6c], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea eax, [ebp - 0x64]
push eax
push 0x28
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.00405038
mov dword [ebp - 0x70], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
xor edx, edx
cmp dword [ebp - 0x70], 0
setne dl
neg edx
movsx eax, dx
test eax, eax
je 0x410e25
mov dword [ebp - 4], 4
xor ecx, ecx
test ecx, ecx
je 0x410d46
mov dword [ebp - 4], 6
mov dword [ebp - 0x6c], 0x1c
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x3c]
push eax
push 0x1c
lea ecx, [ebp - 0x60]
push ecx
push 0
mov edx, dword [ebp - 0x64]
push edx
call fcn.00405088
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
jmp 0x410e25
mov dword [ebp - 4], 9
lea eax, [ebp - 0x44]
push eax
push 0x404ae4
lea ecx, [ebp - 0x68]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaStrToAnsi]
push eax
push 0
call fcn.004050e8
mov dword [ebp - 0x6c], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
xor edx, edx
cmp dword [ebp - 0x6c], 0
setne dl
neg edx
mov word [ebp - 0x74], dx
lea ecx, [ebp - 0x68]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
movsx eax, word [ebp - 0x74]
test eax, eax
je 0x410e25
mov dword [ebp - 4], 0xa
mov dword [ebp - 0x60], 1
mov dword [ebp - 4], 0xb
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x74], 2
jae 0x410dc3
mov dword [ebp - 0x8c], 0
jmp 0x410dcf
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x8c], eax
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x74]
imul edx, edx, 0xc
lea eax, [ebp + edx - 0x5c]
push eax
push 8
call dword [sym.imp.MSVBVM60.DLL___vbaCopyBytes]
mov dword [ebp - 4], 0xc
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x74], 2
jae 0x410e06
mov dword [ebp - 0x90], 0
jmp 0x410e12
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x74]
imul ecx, ecx, 0xc
mov dword [ebp + ecx - 0x54], 2
jmp 0x410d14
mov dword [ebp - 4], 0x11
mov edx, dword [ebp - 0x64]
push edx
call fcn.00404e50
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
push 0x410e4d
jmp 0x410e4c
ret

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

Disassembly:
pushal
nop
nop
call 0x43300c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
jl 0x433030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43301e
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x4043b2
Capabilities:
Parse pe header

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

Function at 0x407c80
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.0041b1a0
mov eax, dword [0x424980]
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.0040ce34
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x407cc2
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x407e39
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041b0f0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1014], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x428d28]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004103e7
mov ecx, dword [esi*4 + 0x428d28]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x1020], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x407e32
cmp eax, dword [edi + ecx + 0x24]
jne 0x407e32
xor esi, esi
lea eax, [ebp - 0x101c]
push esi
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 0x407e32
push dword [ebp - 0x100c]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004103e7
add esp, 0x14
cmp edx, esi
jl 0x407e32
jg 0x407d8d
cmp eax, esi
jb 0x407e32
mov ebx, dword [ebp - 0x1014]
mov eax, dword [ebp - 0x101c]
cmp ebx, esi
jg 0x407e32
jl 0x407daf
cmp dword [ebp - 0x1008], eax
ja 0x407e32
lea edi, [ebp - 0x1004]
xorps xmm0, xmm0
add edi, eax
movlpd qword [ebp - 0x1018], xmm0
lea ecx, [ebp - 0x1004]
cmp dword [ebp - 0x1008], esi
jne 0x407dd4
cmp ebx, esi
je 0x407e19
mov edx, dword [ebp - 0x1014]
mov esi, dword [ebp - 0x1018]
cmp ecx, edi
jae 0x407e19
mov al, byte [ecx]
cmp al, 0xd
jne 0x407dfa
lea eax, [edi - 1]
cmp ecx, eax
jae 0x407e06
cmp byte [ecx + 1], 0xa
jne 0x407e06
inc ecx
jmp 0x407e06
movzx eax, al
movsx eax, byte [eax + 0x424bc8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x407de0
cmp edx, ebx
jne 0x407de0
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x1020]
jmp 0x407e37
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040483e
leave
ret
Function at 0x410463
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x428d28]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4104a5
cmp byte [ebx], 0xa
jne 0x4104a5
or byte [edi + eax + 0x28], 4
jmp 0x4104aa
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4105ad
mov cl, byte [eax]
cmp cl, 0x1a
je 0x410588
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x4104d9
mov eax, dword [ebp - 8]
jmp 0x4104f9
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x410515
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x4104f3
add eax, 2
mov cl, 0xa
jmp 0x4104f6
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x4104bb
jmp 0x4105ad
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 0x410583
cmp dword [ebp - 0x10], 0
je 0x410583
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x428d28]
test byte [eax + edi + 0x28], 0x48
je 0x410562
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x410552
mov byte [esi], 0xa
jmp 0x4105ac
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x428d28]
mov byte [eax + edi + 0x2a], cl
jmp 0x4105ac
cmp byte [ebp - 1], 0xa
jne 0x41056c
cmp esi, ebx
je 0x41054d
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00410405
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4105ad
mov byte [esi], 0xd
jmp 0x4105ac
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x428d28]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x4105aa
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x4105ad
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4105b6
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x428d28]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x4105fa
push 0xa
pop esi
cmp word [ebx], si
jne 0x4105fa
or byte [eax + edi + 0x28], 4
jmp 0x4105ff
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x41076a
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x410742
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x41064c
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x410676
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x410695
push 0xa
pop ebx
cmp word [edx], bx
jne 0x410663
push ebx
add eax, 4
pop edx
jmp 0x41066b
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x410611
jmp 0x41076a
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 0x41073d
cmp dword [ebp - 0x14], 0
je 0x41073d
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x428d28]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x410719
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x4106e1
mov word [esi], ax
jmp 0x410767
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x428d28]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x428d28]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x428d28]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x410767
cmp word [ebp - 4], ax
jne 0x410723
cmp esi, ebx
je 0x4106d9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00410405
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x41076a
push 0xd
pop eax
jmp 0x4106d9
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x428d28]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x410764
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x41076a
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41158d
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x4115a7
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x4115be
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x411616
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.0041135b
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x411616
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x411616
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x411616
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x411610
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x411612
xor bl, bl
mov al, bl
jmp 0x411618
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x4143ae
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 0x41444b
push ebx
push esi
call fcn.00414377
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.0041430d
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4143f8
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41444a
push edi
push eax
call fcn.00411630
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x414418
call fcn.0040e000
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x414449
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041430d
add esp, 0x20
test eax, eax
jne 0x414437
push edi
call fcn.0040e000
jmp 0x41443f
push ebx
call fcn.0040e000
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