joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4055c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, dword [esp + 0x18]
cmp eax, 3
ja case.default.0x4055d1
jmp dword [eax*4 + 0x42e1ac]
cmp dword [0x4370d0], 0
je 0x4056e0
push 0x4370d4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x4370ec]
test edi, edi
je 0x4056d5
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40561b
mov edi, dword [edi + 8]
test edi, edi
je 0x4056d5
push dword [edi]
call ebx
mov esi, eax
call ebp
test eax, eax
jne 0x405610
test esi, esi
je 0x405610
mov ecx, dword [edi + 4]
call dword [0x434848]
push esi
call ecx
add esp, 4
jmp 0x405610
call fcn.004021a0
jmp case.default.0x4055d1
cmp dword [0x4370d0], 0
je case.default.0x4055d1
push 0x4370d4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x4370ec]
test edi, edi
je 0x4056c8
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405687
mov edi, dword [edi + 8]
test edi, edi
je 0x4056c8
push dword [edi]
call ebx
mov esi, eax
call ebp
test eax, eax
jne 0x405680
test esi, esi
je 0x405680
mov ecx, dword [edi + 4]
call dword [0x434848]
push esi
call ecx
add esp, 4
jmp 0x405680
cmp dword [0x4370d0], 0
jne 0x4056bc
push 0x4370d4
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4370d0], 1
jmp case.default.0x4055d1
push 0x4370d4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp case.default.0x4055d1
push 0x4370d4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x4370d0]
cmp eax, 1
jne case.default.0x4055d1
mov eax, dword [0x4370ec]
test eax, eax
je 0x405712
nop word cs:[eax + eax]
mov esi, dword [eax + 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, esi
test esi, esi
jne 0x405700
mov dword [0x4370ec], 0
mov dword [0x4370d0], 0
push 0x4370d4
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, 1
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x405860
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push edi
push esi
mov esi, dword [0x42d004]
xor eax, eax
cmp word [esi], 0x5a4d
jne 0x4058c6
mov ecx, dword [esi + 0x3c]
cmp dword [esi + ecx], 0x4550
jne 0x4058c6
add esi, ecx
cmp word [esi + 0x18], 0x10b
jne 0x4058c6
movzx ecx, word [esi + 6]
test ecx, ecx
je 0x4058c6
mov edx, dword [esp + 0xc]
sub edx, dword [0x42d004]
movzx edi, word [esi + 0x14]
add esi, edi
add esi, 0x18
jmp 0x4058b6
add esi, 0x28
dec ecx
je 0x4058c6
mov edi, dword [esi + 0xc]
cmp edi, edx
ja 0x4058b0
add edi, dword [esi + 8]
cmp edi, edx
jbe 0x4058b0
mov eax, esi
pop esi
pop edi
ret
Function at 0x409630
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
call fcn.00426800
test al, al
je 0x409677
mov esi, dword [fcn.00405740]
push 2
call esi
add esp, 4
push ebp
push ebx
push edi
push str.libunwind:__Unwind_SetGR_context_p__reg_d__value0x_0x__n
push eax
call fcn.0040b130
add esp, 0x14
push 2
call esi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.004268f0
Function at 0x426740
Capabilities:
Query environment variable

Disassembly:
push ebx
push edi
push esi
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
cmp byte [0x438093], 1
jne 0x42675f
test byte [0x438092], 1
jne 0x42677e
jmp 0x4267ab
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x4267ab
mov ebx, dword [fcn.00405740]
push 2
call ebx
add esp, 4
push edi
push esi
push str.libunwind:___unw_init_local_cursor_p__context_p__n
push eax
call fcn.0040b130
add esp, 0x10
push 2
call ebx
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov dword [esi], 0x4336e4
mov dword [esi + 4], 0x438088
movups xmm0, xmmword [edi]
movups xmm1, xmmword [edi + 0x10]
movups xmmword [esi + 8], xmm0
movups xmmword [esi + 0x18], xmm1
movups xmm0, xmmword [edi + 0x20]
movups xmmword [esi + 0x28], xmm0
movups xmm0, xmmword [edi + 0x30]
movups xmmword [esi + 0x38], xmm0
xorps xmm0, xmm0
movups xmmword [esi + 0x48], xmm0
movups xmmword [esi + 0x58], xmm0
movups xmmword [esi + 0x62], xmm0
mov ecx, esi
push 0
call fcn.00427bc0
xor eax, eax
pop esi
pop edi
pop ebx
ret

Function at 0x426800
Capabilities:
Query environment variable

Disassembly:
cmp byte [0x438093], 1
jne 0x426813
movzx eax, byte [0x438092]
and al, 1
ret
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
test eax, eax
setne al
setne byte [0x438092]
mov byte [0x438093], 1
and al, 1
ret

Function at 0x426840
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmp byte [0x438093], 1
jne 0x426864
test byte [0x438092], 1
jne 0x426883
jmp 0x4268b1
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x4268b1
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push ebx
push ebp
push esi
push str.libunwind:___unw_get_reg_cursor_p__regNum_d__value_p__n
push eax
call fcn.0040b130
add esp, 0x14
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push ebp
call edi
mov ecx, eax
mov eax, 0xffffe672
test cl, cl
je 0x4268e4
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push ebp
call edi
mov dword [ebx], eax
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4268f0
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov ebp, dword [esp + 0x44]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
cmp byte [0x438093], 1
jne 0x426917
test byte [0x438092], 1
jne 0x426936
jmp 0x426964
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x426964
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push ebp
push ebx
push esi
push str.libunwind:___unw_set_reg_cursor_p__regNum_d__value0x_x__n
push eax
call fcn.0040b130
add esp, 0x14
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push ebx
call edi
mov ecx, eax
mov eax, 0xffffe672
test cl, cl
je 0x4269f8
mov eax, dword [esi]
mov edi, dword [eax + 0x10]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push ebp
push ebx
call edi
xor eax, eax
cmp ebx, 0xffffffff
jne 0x4269f8
mov eax, dword [esi]
mov edi, dword [eax + 0x24]
mov ecx, edi
call dword [0x434848]
mov eax, esp
mov ecx, esi
push eax
call edi
mov eax, dword [esi]
mov edi, dword [eax + 0x34]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push 0
call edi
cmp dword [esp + 0x10], 0
je 0x4269f6
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push 0xfffffffffffffffe
call edi
mov edi, eax
add edi, dword [esp + 0x10]
mov eax, dword [esi]
mov ebx, dword [eax + 0x10]
mov ecx, ebx
call dword [0x434848]
mov ecx, esi
push edi
push 0xfffffffffffffffe
call ebx
xor eax, eax
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x426b90
Capabilities:
Query environment variable

Disassembly:
push edi
push esi
mov esi, dword [esp + 0xc]
cmp byte [0x438093], 1
jne 0x426baa
test byte [0x438092], 1
jne 0x426bc9
jmp 0x426bf5
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x426bf5
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push esi
push str.libunwind:___unw_step_cursor_p__n
push eax
call fcn.0040b130
add esp, 0xc
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push 0
call edi
pop esi
pop edi
ret

Function at 0x426c10
Capabilities:
Query environment variable

Disassembly:
push edi
push esi
mov esi, dword [esp + 0xc]
cmp byte [0x438093], 1
jne 0x426c2a
test byte [0x438092], 1
jne 0x426c49
jmp 0x426c75
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x426c75
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push esi
push str.libunwind:___unw_step_stage2_cursor_p__n
push eax
call fcn.0040b130
add esp, 0xc
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push 1
call edi
pop esi
pop edi
ret
Function at 0x426c90
Capabilities:
Query environment variable

Disassembly:
push ebx
push edi
push esi
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
cmp byte [0x438093], 1
jne 0x426caf
test byte [0x438092], 1
jne 0x426cce
jmp 0x426cfb
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x426cfb
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push ebx
push esi
push str.libunwind:___unw_get_proc_info_cursor_p__info_p__n
push eax
call fcn.0040b130
add esp, 0x10
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 0x24]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push ebx
call edi
xor ecx, ecx
cmp dword [ebx + 4], 0
mov eax, 0xffffe66b
cmovne eax, ecx
pop esi
pop edi
pop ebx
ret

Function at 0x426d20
Capabilities:
Query environment variable

Disassembly:
push edi
push esi
mov esi, dword [esp + 0xc]
cmp byte [0x438093], 1
jne 0x426d3a
test byte [0x438092], 1
jne 0x426d59
jmp 0x426d85
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x426d85
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push esi
push str.libunwind:___unw_resume_cursor_p__n
push eax
call fcn.0040b130
add esp, 0xc
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 0x28]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
call edi
mov eax, 0xffffe674
pop esi
pop edi
ret

Function at 0x426da0
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmp byte [0x438093], 1
jne 0x426dc4
test byte [0x438092], 1
jne 0x426de3
jmp 0x426e11
push str.LIBUNWIND_PRINT_APIS
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438093], 1
test eax, eax
setne byte [0x438092]
je 0x426e11
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push ebp
push ebx
push esi
push str.libunwind:___unw_get_proc_name_cursor_p__buf_p__bufLen_lu__n
push eax
call fcn.0040b130
add esp, 0x14
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [esi]
mov edi, dword [eax + 0x30]
mov ecx, edi
call dword [0x434848]
mov ecx, esi
push dword [esp + 0x20]
push ebp
push ebx
call edi
xor ecx, ecx
test al, al
mov eax, 0xffffe674
cmovne eax, ecx
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x427830
Capabilities:
Query environment variable

Disassembly:
cmp byte [0x438091], 1
jne 0x427843
movzx eax, byte [0x438090]
and al, 1
ret
push str.LIBUNWIND_PRINT_UNWINDING
call sub.msvcrt.dll_getenv
add esp, 4
test eax, eax
setne al
setne byte [0x438090]
mov byte [0x438091], 1
and al, 1
ret
Function at 0x428110
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x110
mov esi, esp
mov edx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x10]
Function at 0x42aa60
Capabilities:
Enumerate process modules
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x1014
call fcn.00405ac0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push 0x1000
push edx
push eax
call sub.KERNEL32.dll_K32EnumProcessModules
test eax, eax
je 0x42ab8a
mov ecx, dword [esp + 0x10]
xor edx, edx
mov eax, 0
cmp ecx, 4
jb 0x42abf3
shr ecx, 2
mov dword [esp + 8], ecx
jmp 0x42aac3
mov edx, dword [esp + 0xc]
inc edx
xor eax, eax
mov ecx, dword [esp + 8]
cmp edx, ecx
je 0x42abf3
mov dword [esp + 0xc], edx
mov esi, dword [esp + edx*4 + 0x14]
mov eax, dword [esi + 0x3c]
movzx ecx, word [esi + eax + 0x14]
mov edx, dword [esp + 0x102c]
mov dword [edx], esi
mov dword [esp], esi
movzx ebx, word [esi + eax + 6]
test ebx, ebx
je 0x42aab0
add eax, dword [esp]
lea ebp, [eax + ecx]
add ebp, 0x18
mov dword [esp + 4], 0
xor ecx, ecx
jmp 0x42ab12
mov ecx, esi
mov eax, ecx
and al, byte [esp + 4]
test al, 1
jne 0x42ab86
add ebp, 0x28
dec ebx
je 0x42aab0
mov esi, ecx
mov edi, dword [ebp + 0xc]
add edi, dword [esp]
push 8
push str..text
push ebp
call sub.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
je 0x42ab60
push 8
push str..eh_frame
push ebp
call sub.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x42ab00
mov ecx, dword [esp + 0x102c]
mov dword [ecx + 4], edi
mov eax, dword [ebp + 8]
mov dword [ecx + 8], eax
mov al, 1
mov dword [esp + 4], eax
jmp 0x42ab00
mov eax, dword [ebp + 8]
add eax, edi
mov edx, dword [esp + 0x1028]
cmp edi, edx
setbe cl
cmp eax, edx
seta al
and al, cl
mov ecx, esi
or cl, al
mov eax, ecx
and al, byte [esp + 4]
test al, 1
je 0x42ab0c
mov al, 1
jmp 0x42abf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp byte [0x438091], 1
jne 0x42aba6
test byte [0x438090], 1
jne 0x42abc5
jmp 0x42abf1
push str.LIBUNWIND_PRINT_UNWINDING
call sub.msvcrt.dll_getenv
add esp, 4
mov byte [0x438091], 1
test eax, eax
setne byte [0x438090]
je 0x42abf1
mov edi, dword [fcn.00405740]
push 2
call edi
add esp, 4
push esi
push str.libunwind:_findUnwindSections:_EnumProcessModules_failed__returned_error__d_n
push eax
call fcn.0040b130
add esp, 0xc
push 2
call edi
add esp, 4
push eax
call sub.msvcrt.dll_fflush
add esp, 4
xor eax, eax
add esp, 0x1014
pop esi
pop edi
pop ebx
pop ebp
ret 8

Function at 0xd68b68
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xd68886
add edi, 1
mov edx, edi
and edx, edx
call fcn.00d68ba8
add edi, edi
add edi, edx
or edi, edx
xor dword [ebx], eax
or edx, edi
add ebx, 2
sub edx, 0x9524bbc1
cmp ebx, ecx
jl fcn.00d68b68
mov edi, edx
sub edx, 0xb725984a
ret
Function at 0x402070
Capabilities:
Get common file path

Disassembly:
push ebp
push esi
push edi
xor edi, edi
test ebx, ebx
je 0x4020eb
mov ebp, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push edi
push edi
call ebp
push ebx
mov esi, eax
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add eax, esi
add esp, 4
lea eax, [eax + eax + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x4020a7
pop edi
pop esi
pop ebp
ret
push esi
push edi
call ebp
mov ebp, eax
cmp word [edi + ebp*2 - 2], 0x5c
je 0x4020be
mov word [edi + ebp*2], 0x5c
add ebp, 1
push ebx
xor esi, esi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
test eax, eax
jbe 0x4020eb
lea ebp, [edi + ebp*2]
mov cx, word [ebx + esi*2]
mov word [ebp], cx
push ebx
add esi, 1
add ebp, 2
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
cmp esi, eax
jb 0x4020d0
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x402c00
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, dword [0x40c8a0]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
xor ebx, ebx
test eax, eax
push esi
jne 0x402c2d
push eax
push str.Setupapi.dll
call fcn.00402790
add esp, 8
test eax, eax
mov dword [0x40c8a0], eax
je 0x402d66
cmp dword [0x40c8a4], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jne 0x402c56
push str.SetupDiGetClassDevsW
push eax
call esi
test eax, eax
mov dword [0x40c8a4], eax
je 0x402d66
mov eax, dword [0x40c8a0]
cmp dword [0x40c8a8], 0
jne 0x402c79
push str.SetupDiEnumDeviceInfo
push eax
call esi
test eax, eax
mov dword [0x40c8a8], eax
je 0x402d66
mov eax, dword [0x40c8a0]
cmp dword [0x40c8b0], 0
jne 0x402c9c
push str.SetupDiGetDeviceRegistryPropertyW
push eax
call esi
test eax, eax
mov dword [0x40c8b0], eax
je 0x402d66
mov eax, dword [0x40c8a0]
cmp dword [0x40c8ac], 0
jne 0x402cbf
push str.SetupDiGetDeviceInterfaceDetailW
push eax
call esi
test eax, eax
mov dword [0x40c8ac], eax
je 0x402d66
mov eax, dword [0x40c8a0]
cmp dword [0x40c8b8], 0
jne 0x402cdd
push str.SetupDiDestroyDeviceInfoList
push eax
call esi
test eax, eax
mov dword [0x40c8b8], eax
je 0x402d66
push 6
push 0
push 0
push 0
call dword [0x40c8a4]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
je 0x402d68
mov ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
push edi
push eax
mov dword [ecx + 0x18], eax
push esi
mov dword [edi], 0x1c
call dword [0x40c8a8]
test eax, eax
je 0x402d5f
lea ecx, [ecx]
push esi
push ebp
mov eax, edi
call fcn.004023a0
add esp, 8
cmp eax, 1
je 0x402d6c
xor edx, edx
mov eax, edi
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
push edi
add ebx, 1
mov dword [eax + 0x14], edx
push ebx
mov dword [eax + 0x18], edx
push esi
mov dword [edi], 0x1c
call dword [0x40c8a8]
test eax, eax
jne 0x402d20
push esi
call dword [0x40c8b8]
xor eax, eax
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x14]
mov dword [ecx], esi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
Function at 0x4035a0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x14
push ebp
mov ebp, dword [esp + 0x1c]
push esi
xor esi, esi
cmp dword [0x40c978], esi
mov dword [esp + 8], esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 0x24
mov dword [esp + 0x14], 0x26
mov dword [esp + 0x18], 0x2a
jne 0x403636
push 3
push 0x20
push 3
push 1
push 3
push 2
push esi
push esi
call sub.KERNEL32.dll_VerSetConditionMask
push edx
push eax
call sub.KERNEL32.dll_VerSetConditionMask
push edx
push eax
call sub.KERNEL32.dll_VerSetConditionMask
push edx
push eax
push 0x23
push 0x40c978
mov dword [0x40c978], 0x11c
mov dword [0x40c97c], 6
mov dword [0x40c980], 1
mov word [0x40ca8c], si
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
neg eax
sbb eax, eax
add eax, 1
mov dword [0x40c008], eax
jmp 0x40363b
mov eax, dword [0x40c008]
cmp eax, esi
je 0x40364a
pop esi
mov eax, 1
pop ebp
add esp, 0x14
ret
cmp ebp, esi
je 0x40376a
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push edi
push esi
push esi
push esi
push ebp
call ebx
mov edi, eax
test edi, edi
je 0x403768
lea eax, [edi + edi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [esp + 0x10], eax
je 0x403768
push 0
mov ecx, eax
push ecx
push edi
push ebp
call ebx
cmp edi, eax
jbe 0x403768
mov ebp, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ebx, ebx
jmp 0x4036a0
mov eax, dword [esp + ebx*4 + 0x18]
cmp eax, 0x26
jne 0x40371f
push 0
push 0
push str._ProgramW6432_
call ebp
mov edi, eax
test edi, edi
je 0x403768
lea edx, [edi + edi + 2]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x403768
push edi
push esi
push str._ProgramW6432_
call ebp
cmp edi, eax
jne 0x403768
push esi
push str._ProgramW6432_
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x403706
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x409384
push 0x26
jmp 0x403725
cmp word [esi + edi*2 - 4], 0x5c
je 0x403733
push 0x409624
add edi, 1
push edi
push esi
call fcn.00403410
jmp 0x403733
push 0x409384
push eax
call fcn.004034b0
mov esi, eax
add esp, 8
test esi, esi
je 0x403768
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
push eax
mov eax, dword [esp + 0x18]
push esi
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x14], eax
jne 0x403768
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
add ebx, 1
xor esi, esi
cmp ebx, 3
jl 0x4036a0
pop edi
pop ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
mov ecx, dword [esp + 8]
push ecx
call esi
mov eax, dword [esp + 0xc]
pop esi
pop ebp
add esp, 0x14
ret
Function at 0x403900
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push eax
mov eax, dword [esp + 0xc]
call fcn.00403790
mov esi, eax
add esp, 4
test esi, esi
je 0x403942
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403924
test al, 0x50
je 0x403942
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x403937
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
pop esi
ret
mov eax, esi
pop esi
ret
Function at 0x4074c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x40c024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40c038]
cmp eax, 0xffffffff
jne 0x407558
test ecx, ecx
jne 0x407520
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.CompatibilityCheck.log
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
push 0x80000000
push 4
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
jmp 0x407533
push 0
push 0x80000000
push 4
push 0
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x40c038], eax
cmp eax, 0xffffffff
je 0x407558
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x40c038]
cmp eax, 0xffffffff
mov ecx, dword [ebp - 4]
setne al
xor ecx, ebp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret

Function at 0x407570
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x40c024]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [0x40c038]
mov dword [ebp - 0x424], ecx
push edi
mov edi, edx
cmp esi, 0xffffffff
je 0x40764a
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x412]
push edi
push dword [ebp - 0x424]
push eax
movzx eax, word [ebp - 0x416]
push eax
movzx eax, word [ebp - 0x418]
push eax
movzx eax, word [ebp - 0x41a]
push eax
movzx eax, word [ebp - 0x41e]
push eax
movzx eax, word [ebp - 0x420]
push eax
push str.__d__d__d__d:_d:_d___s:_d___
lea eax, [ebp - 0x40c]
push 0x400
push eax
call fcn.00404670
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x410]
add esp, 0x2c
push 0
push ecx
push eax
lea eax, [ebp - 0x40c]
push eax
push esi
call edi
mov eax, ebx
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407620
push 0
lea ecx, [ebp - 0x410]
sub eax, edx
push ecx
push eax
push ebx
push esi
call edi
push 0
lea eax, [ebp - 0x410]
push eax
push 1
push 0x40a3ec
push esi
call edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407bd1
mov esp, ebp
pop ebp
ret