joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4160e0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x318
mov eax, dword [0x5d2020]
xor eax, esp
mov dword [esp + 0x314], eax
push esi
push edi
xor edi, edi
push 0x206
lea eax, [esp + 0x11a]
push edi
push eax
mov esi, ecx
mov word [esp + 0x120], di
call fcn.0044ea7c
mov eax, 8
add esp, 0xc
cmp dword [esi + 0x18], eax
jb 0x416127
mov esi, dword [esi + 4]
jmp 0x41612a
add esi, 4
cmp dword [0x5dff04], eax
mov eax, dword [0x5dfef0]
jae 0x41613c
mov eax, 0x5dfef0
push esi
push eax
lea ecx, [esp + 0x11c]
push 0x5c3c1c
push ecx
mov edx, 0x104
call fcn.0041adc0
add esp, 0x10
lea edx, [esp + 8]
push edx
push 0x20219
push edi
lea eax, [esp + 0x120]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x1c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x41619a
pop edi
mov eax, 0xe00c0012
pop esi
mov ecx, dword [esp + 0x314]
xor ecx, esp
call fcn.0044e502
add esp, 0x318
ret
push 0xfe
lea ecx, [esp + 0x1a]
push edi
push ecx
mov dword [esp + 0x18], edi
mov word [esp + 0x20], di
call fcn.0044ea7c
add esp, 0xc
lea edx, [esp + 0x10]
push edx
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
push ecx
push edi
push str.Name
push edx
mov dword [esp + 0x28], 0xfe
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp esi, edi
jne 0x416207
cmp dword [esp + 0xc], 1
jne 0x416207
push str..Pipe_
mov ecx, ebx
call dword [0x57a2dc]
lea eax, [esp + 0x14]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
jmp 0x41620c
mov esi, 0xe00c001f
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x31c]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.0044e502
add esp, 0x318
ret

Function at 0x416700
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
xor esi, esi
test edi, edi
je 0x416741
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
mov ecx, edi
sub ecx, esi
push ecx
mov ecx, dword [eax + 0x1c]
lea edx, [esi + ebp]
push edx
push ecx
mov dword [esp + 0x28], 0
call ebx
test eax, eax
je 0x416749
add esi, dword [esp + 0x14]
cmp edi, esi
jne 0x416713
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
pop esi
pop ebp
mov eax, 0xe00c0009
pop ebx
ret 8

Function at 0x416760
Capabilities:
Read file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
xor esi, esi
test edi, edi
je 0x4167a1
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
mov ecx, edi
sub ecx, esi
push ecx
mov ecx, dword [eax + 0x1c]
lea edx, [esi + ebp]
push edx
push ecx
mov dword [esp + 0x28], 0
call ebx
test eax, eax
je 0x4167a9
add esi, dword [esp + 0x14]
cmp edi, esi
jne 0x416773
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
pop esi
pop ebp
mov eax, 0xe00c000b
pop ebx
ret 8
Function at 0x417260
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5794a8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5d2020]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov dword [esp + 0x1c], ecx
mov esi, dword [ebp + 8]
lea eax, [esp + 0x24]
push eax
mov ecx, str.admin
mov edx, esi
call fcn.00406730
mov eax, dword [esp + 0x24]
test eax, eax
mov ebx, dword [esi + 0xc]
lea edi, [esi + 8]
je 0x4172b6
cmp eax, edi
je 0x4172bc
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esp + 0x28], ebx
je 0x417421
lea ecx, [esp + 0x24]
push ecx
mov ecx, str.withOutUac
mov edx, esi
call fcn.00406730
mov eax, dword [esp + 0x24]
test eax, eax
mov ebx, dword [edi + 4]
je 0x4172e6
cmp eax, edi
je 0x4172ec
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x1c]
je 0x4172fa
mov byte [ebx + 4], 0
mov ecx, str.path
mov eax, esi
call fcn.004067d0
lea edx, [esp + 0x18]
push edx
mov ecx, eax
call fcn.00401bd0
mov ecx, str.param
mov eax, esi
mov dword [esp + 0x38], 0
call fcn.004067d0
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call fcn.00401bd0
mov ecx, 0x5c3e04
mov eax, esi
mov byte [esp + 0x38], 1
call fcn.004067d0
lea edx, [esp + 0x20]
push edx
mov ecx, eax
call fcn.00401bd0
lea eax, [esp + 0x14]
push eax
mov byte [esp + 0x3c], 2
call fcn.00416fc0
mov ecx, dword [esp + 0x24]
add esp, 4
push ecx
call dword [sym.imp.MSVCR80.dll__wtoi]
add esp, 4
lea edi, [esp + 0x18]
mov esi, eax
call fcn.00406840
cmp esi, 1
mov ecx, edi
je 0x41738e
push esi
push ebx
lea edx, [esp + 0x1c]
call fcn.00417440
jmp 0x417398
push ebx
lea ebx, [esp + 0x18]
call fcn.00417530
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4173bd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4173e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41740a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x417ae0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x40
mov eax, dword [0x5d2020]
xor eax, esp
mov dword [esp + 0x3c], eax
push 0x3c
lea eax, [esp + 4]
push 0
push eax
call fcn.0044ea7c
mov ecx, dword [esi]
mov edx, dword [edi]
add esp, 0xc
lea eax, [esp]
push eax
mov dword [esp + 4], 0x3c
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], str.runas
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.0044e502
add esp, 0x40
ret
Function at 0x438950
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov eax, dword [edi]
lea ecx, [esp]
push ecx
mov ecx, dword [esp + 0xc]
push esi
add eax, eax
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
push 0
mov dword [edi], 0
mov edx, dword [ecx]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4389be
mov eax, dword [esp + 0xc]
cmp eax, 1
je 0x43898f
cmp eax, 2
jne 0x4389aa
test esi, esi
mov eax, dword [esp]
je 0x4389b8
test eax, eax
je 0x4389b3
test al, 1
jne 0x4389aa
mov ecx, eax
shr ecx, 1
cmp word [esi + ecx*2 - 2], 0
je 0x4389b8
mov eax, 0xd
pop ecx
ret 8
mov word [esi], 0
shr eax, 1
mov dword [edi], eax
xor eax, eax
pop ecx
ret 8
Function at 0x438a80
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x576708
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d2020]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
mov eax, dword [0x5dcd6c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5dcd6c
call edx
add eax, 0x10
mov dword [esp + 0x2c], eax
mov ebx, 1
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], bl
call fcn.00438c30
lea edi, [esp + 0x2c]
mov byte [esp + 0x24], 2
call fcn.004042f0
mov byte [esp + 0x24], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x438b0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x2c]
mov eax, dword [esi - 8]
mov edi, dword [0x5dfde8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x438b3c
mov ecx, 0x104
lea eax, [esp + 0x2c]
call fcn.00401e40
mov esi, dword [esp + 0x2c]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test esi, esi
jne 0x438b4c
xor eax, eax
jmp 0x438b62
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x438b51
sub eax, edx
sar eax, 1
js 0x438bd4
cmp eax, dword [esi - 8]
jg 0x438bd4
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp dword [ebp], 0
jne 0x438b8b
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
mov dword [ebp], eax
je 0x438ba9
mov ecx, dword [ebp]
push str.GetInterface
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x438ba9
lea edx, [ebp + 4]
push edx
push 0x5c5ec8
call eax
mov eax, dword [ebp + 4]
test eax, eax
jne 0x438bde
mov byte [esp + 0x24], al
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x438bd0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x438c0f
push 0x80070057
call fcn.00401bb0
mov ecx, dword [eax]
mov edx, dword [ecx]
push 0xd
push eax
call edx
test eax, eax
lea eax, [esi - 0x10]
sete bl
mov byte [esp + 0x24], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x438c0d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, bl
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
Function at 0x438f80
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x574128
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x5d2020]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x40], 0
call fcn.00439090
push str.TfeqtgubU_Njh_tfeq_ZLQ_sY__ft
lea edi, [esp + 0x20]
mov byte [esp + 0x17], al
call fcn.00401150
add esp, 4
cmp dword [eax + 0x18], 8
jb 0x438fdb
mov edi, dword [eax + 4]
jmp 0x438fde
lea edi, [eax + 4]
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
test eax, eax
je 0x438ff1
push eax
call ebx
lea eax, [esp + 0x14]
push eax
push edi
push reloc.WS2_32.dll_accept
mov dword [esp + 0x20], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x43900d
lea esi, [eax + 1]
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
test esi, esi
mov eax, dword [esp + 0x14]
jne 0x43903b
test eax, eax
je 0x439026
push eax
call ebx
xor al, al
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret
test eax, eax
movzx ecx, byte [esp + 0x13]
mov dword [esp + 0x18], ecx
je 0x439026
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push 0
push str.sum_vip_status
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
mov eax, dword [esp + 0x14]
jne 0x43901f
test eax, eax
je 0x43906e
push eax
call ebx
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret
Function at 0x439120
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x14
mov eax, dword [0x5d2020]
xor eax, esp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
push edi
xor edi, edi
cmp eax, edi
mov dword [esp + 8], ecx
mov byte [esp + 0xc], 0
mov dword [esp + 0xd], edi
mov dword [esp + 4], edi
je 0x43922c
cmp word [eax], di
je 0x43922c
push ebp
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x439219
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, edi
jbe 0x4391fe
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x24]
push eax
push ebp
call ebx
test eax, eax
je 0x4391fd
lea ecx, [esp + 0x18]
call fcn.00439290
test eax, eax
je 0x4391fd
add esi, 0xfffffffc
lea ecx, [esi + 1]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4391fd
mov edx, dword [esp + 0x14]
push 0
push 0
push 4
push ebp
mov dword [edx], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
push esi
push edi
push ebp
call ebx
test eax, eax
je 0x4391fd
mov ecx, edi
call fcn.00439240
test eax, eax
jge 0x4391fd
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
pop ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
mov eax, edi
pop edi
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.0044e502
add esp, 0x14
ret
pop ebp
mov eax, edi
pop edi
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.0044e502
add esp, 0x14
ret
mov ecx, dword [esp + 0x14]
mov eax, edi
pop edi
xor ecx, esp
call fcn.0044e502
add esp, 0x14
ret

Function at 0x439240
Capabilities:
Encode data using xor

Disassembly:
test ecx, ecx
je 0x43927e
test esi, esi
jbe 0x43927e
mov edx, esi
shr edx, 2
mov eax, 0
je 0x439262
xor dword [ecx + eax*4], 0xd8d8d8d8
add eax, 1
cmp eax, edx
jb 0x439254
add eax, eax
add eax, eax
cmp eax, esi
jae 0x43927b
lea ebx, [ebx]
xor byte [eax + ecx], 0xd8
add eax, 1
cmp eax, esi
jb 0x439270
xor eax, eax
ret
mov eax, 0x80004005
ret
Function at 0x43aa80
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x574b24
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x5d2020]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1c]
or eax, 0xffffffff
xor edi, edi
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], edi
mov dword [esp + 0x14], edi
lea ecx, [esi + 0x14]
mov dword [esi], vtable.TiXmlAttribute.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [esi + 0x30]
mov byte [esp + 0x14], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov dword [esi + 0x10], edi
mov dword [esi + 0x50], edi
mov dword [esi + 0x4c], edi
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 4

Function at 0x43ab00
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x574af0
mov eax, dword fs:[0]
push eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d2020]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov esi, dword [esp + 0x24]
or eax, 0xffffffff
xor ebp, ebp
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebp
lea edi, [esi + 0x14]
mov dword [esp + 0x1c], ebp
mov ecx, edi
mov dword [esi], vtable.TiXmlAttribute.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ebx, [esi + 0x30]
mov ecx, ebx
mov byte [esp + 0x1c], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov eax, dword [esp + 0x28]
push eax
mov ecx, edi
mov byte [esp + 0x20], 2
call dword [0x57a290]
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, ebx
call dword [0x57a290]
mov dword [esi + 0x10], ebp
mov dword [esi + 0x50], ebp
mov dword [esi + 0x4c], ebp
mov eax, esi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
Function at 0x43efa0
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x5759f0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d2020]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
xor esi, esi
mov dword [esp + 0x1c], esi
mov eax, dword [0x5dcd6c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5dcd6c
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], esi
mov eax, dword [0x5dcd6c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5dcd6c
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, str.uninstall_reg_fix
mov byte [esp + 0x30], 1
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x43f010
sub eax, edx
sar eax, 1
mov ebx, eax
push str.uninstall_reg_fix
lea eax, [esp + 0x20]
call fcn.00402030
mov eax, str.enable_channel
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43f037
sub eax, edx
sar eax, 1
mov ebx, eax
push str.enable_channel
lea eax, [esp + 0x1c]
call fcn.00402030
lea edi, [esp + 0x1c]
call fcn.00406840
lea edi, [esp + 0x18]
call fcn.00406840
mov esi, dword [esp + 0x38]
lea eax, [esp + 0x20]
add esi, 8
push eax
lea ebx, [esp + 0x20]
call fcn.00409230
mov edi, dword [esp + 0x20]
test edi, edi
mov ebx, dword [esi + 4]
je 0x43f08c
cmp edi, esi
je 0x43f096
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
call esi
jmp 0x43f09c
mov esi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ebp, dword [esp + 0x24]
cmp ebp, ebx
je 0x43f12b
test edi, edi
jne 0x43f0ae
call esi
cmp ebp, dword [edi + 4]
jne 0x43f0b5
call esi
lea ecx, [esp + 0x20]
push ecx
lea esi, [ebp + 0x10]
lea ebx, [esp + 0x1c]
call fcn.00409330
cmp ebp, dword [edi + 4]
mov ebx, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jne 0x43f0d3
call ebx
mov edi, dword [esp + 0x20]
test edi, edi
lea eax, [ebp + 0x10]
mov ebp, dword [eax + 4]
je 0x43f0e5
cmp edi, eax
je 0x43f0e7
call ebx
mov esi, dword [esp + 0x24]
cmp esi, ebp
je 0x43f12b
test edi, edi
jne 0x43f0f5
call ebx
cmp esi, dword [edi + 4]
jne 0x43f0fc
call ebx
mov eax, dword [esi + 0x10]
sub eax, 0x10
call fcn.004045e0
mov esi, dword [esp + 0x3c]
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x43f153
mov esi, dword [esp + 0x3c]
push esi
mov ecx, 0x5c39ac
call fcn.00401bd0
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f15f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43f187
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 8
Function at 0x43f850
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
sub esp, 0xc
push ebp
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x14]
xor esi, esi
push eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
xor ebp, ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x43f9ff
mov eax, dword [edi + 0x14]
push ebx
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x43fa0a
lea eax, [esp + 0x14]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [esp + 0x14], ebp
mov esi, eax
jne 0x43f9dd
cmp esi, 0x200000
ja 0x43f9dd
test esi, esi
je 0x43f9dd
cmp esi, 0xffffffff
je 0x43f9dd
cmp dword [edi + 0x18], ebp
je 0x43f93d
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044e4eb
mov edi, dword [esp + 0x24]
add esp, 4
test eax, eax
mov dword [edi], eax
je 0x43f9dd
lea ecx, [esi + esi + 2]
push ecx
push ebp
push eax
call fcn.0044ea7c
add esp, 0xc
push ebp
push ebp
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x43f9dd
mov eax, dword [edi]
push ebp
lea edx, [esp + 0x1c]
push edx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x43f9d1
lea edi, [esi + 1]
push edi
call fcn.0044e4eb
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x43f9dd
push edi
push 0
push ebp
call fcn.0044ea7c
add esp, 0xc
push 0
lea ecx, [esp + 0x1c]
push ecx
push esi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x43f9dd
push 0
push 0
push 0xffffffffffffffff
push ebp
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
test esi, esi
je 0x43f9dd
xor ecx, ecx
lea eax, [esi + 2]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044e4eb
mov edi, eax
mov eax, dword [esp + 0x24]
add esp, 4
test edi, edi
mov dword [eax], edi
je 0x43f9dd
lea ecx, [esi + esi + 2]
push ecx
push 0
push edi
call fcn.0044ea7c
add esp, 0xc
push esi
push edi
push 0xffffffffffffffff
push ebp
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x43f9dd
mov dword [esp + 0x10], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x43f9f1
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x10]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0xc
ret 4
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret 4
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret 4