joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bf04
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
and dword [esp], 0
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x40c044
cmp dword [ebp + 0xc], 0
je 0x40c044
mov eax, dword [ebp + 0x18]
lea edi, [esi + 0x1c]
mov ebx, dword [ebp + 0x14]
push edi
mov dword [esi + 0x28], eax
lea eax, [esp + 0x10]
push eax
push dword [ebp + 0x10]
mov dword [esi + 0x24], ebx
push dword [ebp + 0xc]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40bf8a
cmp byte [esi + 0x4c], al
jne 0x40c073
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40c013
push dword [esi + 0x34]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40bfa4
push eax
lea eax, [esp + 0x10]
push eax
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x40bf93
mov eax, dword [esp + 0xc]
jmp 0x40c076
push str.GetOverlappedResult_error:
push str.os_local_file_pwrit
push 0x280
jmp 0x40bffa
cmp eax, 0x102
jne 0x40bfd3
push 0x45d
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.WaitForSingleObject_retWAIT_TIMEOUT_n
push str.os_local_file_pwrit
push 0x286
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 8
jmp 0x40c009
cmp eax, 0x80
jne 0x40bfeb
push str.WaitForSingleObject_retWAIT_ABANDONED_n
push str.os_local_file_pwrit
push 0x28a
jmp 0x40bfc5
push str.WaitForSingleObject_error:
push str.os_local_file_pwrit
push 0x28e
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 0x108
push 0
call fcn.0040f171
add esp, 0x1c
push dword [ebp + 0x10]
push dword [ebp + 0x18]
push ebx
push str.WriteFile_offset_lld_size_d_error:
push str.os_local_file_pwrit
push 0x291
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 0x108
push 0
call fcn.0040f171
add esp, 0x28
jmp 0x40c073
push str.file__data
push str.expr__s_:_assert_failed_n
push str.os_local_file_pwrit
push 0x274
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 3
push 0
call fcn.0040f171
add esp, 0x20
call fcn.00408ece
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ea04
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x33dc
call fcn.0042b760
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x33d8], eax
push ebx
push esi
push edi
push ecx
push str..PhysicalDrive_d
lea eax, [esp + 0x24]
mov ebx, edx
push 0x100
push eax
xor esi, esi
call fcn.00408bf1
add esp, 0x10
lea eax, [esp + 0x1c]
push esi
push esi
push 3
push esi
push 3
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
or eax, 0xffffffff
cmp edi, eax
je 0x40eb9f
push ebp
push 0xc
lea eax, [esp + 0x18]
mov dword [esp + 0x14], esi
push esi
push eax
call fcn.00411470
mov ebp, 0x2710
mov dword [esp + 0x20], esi
push ebp
lea eax, [esp + 0xce8]
mov dword [esp + 0x28], esi
push esi
push eax
call fcn.00411470
add esp, 0x18
lea eax, [esp + 0x10]
push esi
push eax
push ebp
lea eax, [esp + 0xce4]
push eax
push 0xc
lea eax, [esp + 0x28]
push eax
push 0x2d1400
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40eb94
mov ecx, dword [esp + 0xce4]
lea eax, [esp + 0x8f0]
push eax
lea eax, [esp + 0xcdc]
push eax
call fcn.0040e8d3
mov ecx, dword [esp + 0xcf0]
lea eax, [esp + 0x510]
push eax
lea eax, [esp + 0xce4]
push eax
call fcn.0040e8d3
mov ecx, dword [esp + 0xcfc]
lea eax, [esp + 0x900]
push eax
lea eax, [esp + 0xcec]
push eax
call fcn.0040e8d3
mov ecx, dword [esp + 0xd08]
lea eax, [esp + 0x138]
push eax
lea eax, [esp + 0xcf4]
push eax
call fcn.0040e8d3
movsx ax, byte [esp + 0x140]
mov ebp, 0x107
push ebp
movzx eax, ax
push eax
call fcn.0041b851
add esp, 0x28
test eax, eax
jne 0x40eb5e
movsx ax, byte [esp + 0x133]
push ebp
movzx eax, ax
push eax
call fcn.0041b851
pop ecx
pop ecx
test eax, eax
je 0x40eb94
push ecx
lea eax, [esp + 0x124]
mov esi, 0x80
push eax
lea ecx, [ebx + 0x100]
mov edx, esi
call fcn.00408ae8
pop ecx
lea eax, [esp + 0x50c]
mov edx, esi
push eax
lea ecx, [ebx + 0x80]
call fcn.00408ae8
pop ecx
xor esi, esi
pop ecx
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 1]
pop ebp
mov ecx, dword [esp + 0x33e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00410199
add esp, 0x33dc
ret

Function at 0x40eeeb
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2004
call fcn.0042b760
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x44bac0], 0
push ecx
jne 0x40ef27
lea edx, [ebp - 0x1004]
call fcn.00409e40
pop ecx
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jmp 0x40ef40
lea edx, [ebp - 0x2004]
call fcn.00409d78
pop ecx
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40ef49
or eax, eax
jmp 0x40ef51
shr eax, 4
not eax
and eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410199
leave
ret
Function at 0x40efcc
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x11c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x114], eax
mov eax, dword [esp + 0x12c]
push ebx
mov ebx, dword [esp + 0x128]
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x130]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
test edi, edi
jne 0x40f026
mov edi, dword [0x44e500]
test edi, edi
jne 0x40f026
call fcn.0040ef5d
mov edx, dword [esp + 0x14]
mov edi, eax
mov dword [0x44e500], edi
movzx ebp, dl
cmp dword [edi + 4], ebp
jl 0x40f14e
mov esi, dword [esp + 0x138]
cmp esi, 0xffffffff
jne 0x40f047
push ebx
call fcn.004176c0
pop ecx
mov esi, eax
push dword [esp + 0x18]
lea eax, [esp + 0x24]
push 0x433bb4
push 0x100
push eax
call fcn.00408bf1
add esp, 0x10
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x40f095
mov eax, dword [edi + 0x10]
test eax, eax
je 0x40f095
push esi
push ebx
cmp ebp, 4
ja 0x40f08a
lea eax, [esp + 0x28]
push eax
push ebp
call ecx
jmp 0x40f092
lea ecx, [esp + 0x28]
push ecx
push ebp
call eax
add esp, 0x10
cmp byte [edi + 8], 0
je 0x40f0aa
push ecx
push ebx
push ecx
mov edx, ebp
mov ecx, edi
call fcn.0040f9cc
add esp, 0xc
cmp byte [edi + 9], 0
je 0x40f0dd
test byte [edi], 2
mov ecx, ebx
je 0x40f0bc
lea ecx, [ebx + 9]
jmp 0x40f0c4
test byte [edi], 0x40
je 0x40f0c4
lea ecx, [ebx + 0xd]
call fcn.00408645
mov esi, eax
test esi, esi
je 0x40f0d6
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, esi
call fcn.004087c0
cmp byte [edi + 0xa], 0
je 0x40f10c
mov eax, dword [esp + 0x1c]
mov esi, ebx
test eax, eax
cmovne esi, eax
push esi
call fcn.004176c0
pop ecx
push eax
lea eax, [esp + 0x24]
mov edx, ebp
push esi
push eax
lea ecx, [edi + 0x428]
call fcn.0040f6a2
add esp, 0xc
cmp byte [edi + 0xb], 0
je 0x40f129
push ecx
lea eax, [esp + 0x24]
mov edx, ebp
push ebx
push eax
lea ecx, [edi + 0x1c3c]
call fcn.0040f8da
add esp, 0xc
lea ecx, [edi + 0x41c]
mov edx, ebx
call fcn.0040feed
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp ebp, 2
jne 0x40f14e
test dword [esp + 0x14], 0x200
je 0x40f169
mov ecx, dword [esp + 0x124]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00410199
add esp, 0x11c
ret
push 1
call fcn.00418eef
int3
Function at 0x40f598
Capabilities:
Read file on windows

Disassembly:
push edi
mov edi, ecx
push 2
push 0
push dword [edi + 0x1810]
call fcn.0041a5de
push dword [edi + 0x1810]
call fcn.00421c72
mov ecx, eax
add esp, 0x10
mov eax, dword [edi + 0x1804]
cmp ecx, eax
jl 0x40f69e
push ebx
push esi
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push 0
sub ecx, esi
push ecx
push dword [edi + 0x1810]
call fcn.0041a5de
push esi
call fcn.00408716
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x40f683
push ebp
push dword [edi + 0x1810]
call fcn.00421c72
push dword [edi + 0x1810]
push esi
push 1
push ebx
call fcn.0041a839
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x40f682
push dword [edi + 0x1810]
call fcn.0041a2d3
push 0x20
mov edx, 0x437728
mov ecx, edi
call fcn.00409ef4
mov dword [edi + 0x1810], eax
pop ecx
pop ecx
test eax, eax
je 0x40f682
push 0xa
push ebx
call fcn.004115d0
mov esi, eax
push 0
push 0
push dword [edi + 0x1810]
test esi, esi
cmove esi, ebx
call fcn.0041a5de
push dword [edi + 0x1810]
mov eax, ebx
sub eax, esi
dec eax
add eax, ebp
push 1
push eax
lea eax, [esi + 1]
push eax
call fcn.00419ddb
push dword [edi + 0x1810]
call fcn.0041a129
add esp, 0x28
pop ebp
mov ecx, ebx
call fcn.004087c0
push 2
push 0
push dword [edi + 0x1810]
call fcn.0041a5de
add esp, 0xc
pop esi
pop ebx
xor eax, eax
pop edi
ret

Function at 0x40fa4b
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0042b760
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x44e504], 0
je 0x40fabd
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x1004]
push 0x1000
push eax
call fcn.00408880
add esp, 0x10
lea eax, [ebp - 0x1004]
push eax
push 0x433bb4
push 2
call fcn.00414bba
pop ecx
push eax
call fcn.004080c3
push 2
call fcn.00414bba
push eax
call fcn.0041a129
add esp, 0x14
lea eax, [ebp - 0x1004]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.00410199
leave
ret
Function at 0x40fc5a
Capabilities:
Connect socket
Get hostname

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov eax, edx
mov ebp, ecx
push edi
push eax
push ebp
push str.syslog_open___s:_s___n
mov dword [esp + 0x20], eax
mov esi, eax
call fcn.0040fa4b
add esp, 0xc
cmp dword [0x47771c], 0
jne 0x40fcc5
push 0x80
mov edi, 0x477720
push edi
call dword [sym.imp.WS2_32.dll_gethostname]
cmp byte [0x477720], 0
je 0x40fcae
push str._none_
push edi
call fcn.00414c40
pop ecx
pop ecx
test eax, eax
jne 0x40fcbb
push str.unknown
push edi
call fcn.00418ff0
pop ecx
pop ecx
mov dword [0x47771c], 1
push 2
pop ebx
push 0x20
lea eax, [esp + 0x1c]
mov edi, esi
push 0
push eax
call fcn.00411470
add esp, 0xc
cmp ebx, 2
jne 0x40fcfa
test byte [esp + 0x3c], bl
je 0x40fd1d
cmp dword [esp + 0x14], 0
push ebx
pop eax
mov dword [esp + 0x20], eax
jne 0x40fd25
mov esi, str.syslog
jmp 0x40fd21
mov esi, edi
cmp ebx, 1
jne 0x40fd1d
test byte [esp + 0x3c], 4
je 0x40fd1d
xor eax, eax
inc eax
cmp dword [esp + 0x14], 0
mov dword [esp + 0x20], eax
jne 0x40fd25
mov esi, str.syslog_conn
jmp 0x40fd21
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40fda4
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
call fcn.0040aadd
cmp dword [eax + 0x6c], edi
je 0x40fddd
call fcn.0040aadd
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x1c]
push ecx
push esi
push ebp
call dword [eax + 0x6c]
test eax, eax
jne 0x40fdfe
mov eax, dword [esp + 0x10]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40fd7e
mov ecx, dword [esp + 0x10]
call fcn.004100c4
jmp 0x40fda4
mov eax, dword [esp + 0x10]
push dword [eax + 0x10]
push dword [eax + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov ecx, dword [esp + 0x10]
cmp eax, 0xffffffff
jne 0x40fdd0
call fcn.004100c4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
sub ebx, 1
jne 0x40fcc8
push esi
push ebp
push str.failed_to_connect_to__s_port__s
push 2
call fcn.00414bba
pop ecx
push eax
call fcn.004080c3
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
call fcn.004100c4
test ebx, ebx
je 0x40fdad
mov eax, edi
jmp 0x40fdc8
push str.getaddrinfoNULL_n
push str.pl_getaddrinfo
push 9
push str.srcliblibpalwinfix_sock.c
push 0x432f04
push 7
push edi
call fcn.0040f171
add esp, 0x1c
push str.getaddrinfo
call fcn.0042b9a2
pop ecx
push esi
push ebp
push str.failed_to_resolve_name__s_port__s
jmp 0x40fdb4
Function at 0x40fe12
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x62c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x628], eax
test byte [ecx], 2
mov eax, dword [esp + 0x630]
push ebx
mov ebx, dword [esp + 0x638]
push ebp
push esi
push edi
mov edi, dword [esp + 0x648]
mov ebp, edx
je 0x40fe4b
add edi, 9
jmp 0x40fe53
test byte [ecx], 0x40
je 0x40fe53
add edi, 0xd
mov ecx, eax
call fcn.0040fb56
mov esi, eax
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
push str.__d_
lea eax, [esp + 0x20]
push 0x1e
push eax
call fcn.00408bf1
lea eax, [esp + 0x20]
push eax
call fcn.00418f05
lea eax, [esp + 0x24]
push eax
call fcn.0042b9cc
push edi
lea ecx, [esp + 0x34]
test ebx, ebx
push ecx
mov ecx, str._someone_
cmovne ecx, ebx
add eax, 4
push ecx
push 0x477720
push eax
push esi
push str.__d__.15s__.32s__.64s_s:__.800s
lea eax, [esp + 0x6c]
push 0x600
push eax
call fcn.00408bf1
add esp, 0x3c
lea eax, [esp + 0x38]
push 0
push eax
call fcn.004176c0
pop ecx
inc eax
push eax
lea eax, [esp + 0x40]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [esp + 0x638]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00410199
add esp, 0x62c
ret

Function at 0x410a69
Capabilities:
Parse pe header

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

Function at 0x41da25
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42e068
push 0x42e060
push str.FlsAlloc
push 0x1e
call fcn.0041d8e6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41da59
push dword [ebp + 8]
mov ecx, esi
call dword [0x42c1e8]
call esi
jmp 0x41da5f
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41daa3
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42e078
push 0x42e070
push str.FlsGetValue
push 0x20
call fcn.0041d8e6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41dada
push dword [ebp + 8]
mov ecx, esi
call dword [0x42c1e8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x421a6b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0042b760
mov eax, dword [section..data]
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.0041df24
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x421aad
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x421c09
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0042b4e0
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 + 0x44cf10]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004215dd
mov ecx, dword [esi*4 + 0x44cf10]
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 0x421c02
cmp eax, dword [edi + ecx + 0x24]
jne 0x421c02
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 0x421c02
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004215dd
add esp, 0x14
test edx, edx
jl 0x421c02
jg 0x421b78
test eax, eax
jb 0x421c02
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x421c02
jl 0x421b92
cmp dword [ebp - 0x1008], eax
ja 0x421c02
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x421bb0
test ebx, ebx
je 0x421be9
cmp ecx, edi
jae 0x421be9
mov al, byte [ecx]
cmp al, 0xd
jne 0x421bca
lea eax, [edi - 1]
cmp ecx, eax
jae 0x421bd6
cmp byte [ecx + 1], 0xa
jne 0x421bd6
inc ecx
jmp 0x421bd6
movzx eax, al
movsx eax, byte [eax + 0x44b250]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x421bb0
cmp edx, ebx
jne 0x421bb0
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x421c07
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00410199
leave
ret
Function at 0x4227b1
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 + 0x44cf10]
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 0x4227f1
cmp byte [ebx], 0xa
jne 0x4227f1
or byte [eax + edi + 0x28], 4
jmp 0x4227f6
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4228f4
mov al, byte [edx]
cmp al, 0x1a
je 0x4228d6
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x422825
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x42284a
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x422854
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 0x422807
jmp 0x4228f4
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 0x4228d1
cmp dword [ebp - 0xc], 0
je 0x4228d1
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x44cf10]
test byte [eax + edi + 0x28], 0x48
je 0x4228ab
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x422896
mov byte [esi], dl
jmp 0x4228a7
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x44cf10]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4228f4
cmp byte [ebp - 1], 0xa
jne 0x4228ba
cmp esi, ebx
jne 0x4228ba
mov byte [esi], 0xa
jmp 0x4228f3
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004215fb
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4228f4
mov byte [esi], 0xd
jmp 0x4228f3
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x44cf10]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4228f0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4228f4
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4228fd
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 + 0x44cf10]
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 0x422940
cmp word [esi], dx
jne 0x422940
or byte [edi + eax + 0x28], 4
jmp 0x422945
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 0x422a98
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 0x422a78
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x422987
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4229bd
cmp eax, edx
jae 0x4229c9
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 0x42295f
jmp 0x422a98
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 0x422a74
cmp dword [ebp - 0x14], 0
je 0x422a74
mov eax, dword [ebx*4 + 0x44cf10]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x422a4c
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x422a15
mov word [esi], cx
jmp 0x422a48
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x44cf10]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x44cf10]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x44cf10]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x422a98
pop ebx
cmp word [ebp - 4], bx
jne 0x422a5d
cmp esi, dword [ebp + 0xc]
jne 0x422a5d
mov word [esi], bx
jmp 0x422a95
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004215fb
add esp, 0x10
cmp word [ebp - 4], bx
je 0x422a98
push 0xd
jmp 0x422a91
mov ecx, dword [ebx*4 + 0x44cf10]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x422a8f
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x422a98
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 0x4232b9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0042312a
Function at 0x4256c8
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 0x425765
push ebx
push esi
call fcn.00425691
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.0041fa70
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x425712
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x425764
push edi
push eax
call fcn.0041e699
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x425732
call fcn.0041d779
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x425763
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041fa70
add esp, 0x20
test eax, eax
jne 0x425751
push edi
call fcn.0041d779
jmp 0x425759
push ebx
call fcn.0041d779
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 0x425768
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x425779
pop esi
ret
push ebx
push edi
push esi
call fcn.00425691
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0041e699
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4257a1
push ebx
push esi
push edi
call fcn.00410ef0
add esp, 0xc
push 0
call fcn.0041d779
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x425eed
Capabilities:
Set environment variable

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