joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401200
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401219
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401254
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x401250
lea ebx, [ebx]
cmp esi, eax
jae 0x401254
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401240
cmp esi, eax
jb 0x40125a
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402a60
Capabilities:
Check os version

Disassembly:
sub esp, 0x98
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x94], eax
push 0x94
lea eax, [esp + 4]
push 0
push eax
call fcn.00415a70
add esp, 0xc
lea ecx, [esp]
push ecx
mov dword [esp + 4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x9c]
cmp eax, 8
ja case.default.0x402aaa
jmp dword [eax*4 + 0x402bb4]
cmp dword [esp + 0x10], 1
jne case.default.0x402aaa
cmp dword [esp + 8], 0
jmp 0x402b98
cmp dword [esp + 0x10], 1
jne case.default.0x402aaa
cmp dword [esp + 8], 0xa
jmp 0x402b98
cmp dword [esp + 0x10], 1
jne case.default.0x402aaa
cmp dword [esp + 8], 0x5a
jne case.default.0x402aaa
mov eax, 1
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004152b4
add esp, 0x98
ret
cmp dword [esp + 4], 5
jmp 0x402ab6
xor eax, eax
cmp dword [esp + 4], 5
sete al
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004152b4
add esp, 0x98
ret
cmp dword [esp + 4], 5
jne case.default.0x402aaa
cmp dword [esp + 8], 1
jne case.default.0x402aaa
mov eax, 1
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004152b4
add esp, 0x98
ret
mov eax, dword [esp + 4]
cmp eax, 5
ja 0x402b6b
jne case.default.0x402aaa
cmp dword [esp + 8], 1
jb case.default.0x402aaa
mov eax, 1
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004152b4
add esp, 0x98
ret
cmp dword [esp + 4], 6
jmp 0x402ab6
mov eax, dword [esp + 4]
cmp eax, 6
ja 0x402b6b
je 0x402b6b
mov ecx, dword [esp + 0x94]
xor ecx, esp
xor eax, eax
call fcn.004152b4
add esp, 0x98
ret
Function at 0x402c90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x810
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x80c], eax
push esi
mov esi, dword [esp + 0x818]
push edi
mov edi, dword [esp + 0x820]
lea eax, [esp + 8]
push eax
push 0x20019
mov dword [esp + 0x14], 0x800
call fcn.00402be0
add esp, 4
push eax
push 0
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402d33
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 8]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x402d33
lea eax, [esp + 0x14]
push eax
call fcn.00416897
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x80c]
xor ecx, esp
call fcn.004152b4
add esp, 0x810
ret
mov ecx, dword [esp + 0x814]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.004152b4
add esp, 0x810
ret

Function at 0x402d50
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1004
call fcn.00416270
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x1000], eax
push esi
mov esi, dword [esp + 0x100c]
push 0x1000
lea eax, [esp + 8]
push 0
push eax
call fcn.00415a70
add esp, 0xc
push 0x1000
lea ecx, [esp + 8]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
pop esi
test eax, eax
jne 0x402daf
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.004152b4
add esp, 0x1004
ret
lea edx, [esp]
push edx
call fcn.00416897
mov ecx, dword [esp + 0x1004]
add esp, 4
xor ecx, esp
call fcn.004152b4
add esp, 0x1004
ret
Function at 0x403510
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1004
call fcn.00416270
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x1000], eax
cmp dword [0x43c5fc], 0
je 0x403707
push ebx
push str._n
push 1
call fcn.00404aa0
push str._Licensing_Environment_Variables_n
push 1
call fcn.00404aa0
push str._n_n
push 1
call fcn.00404aa0
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x403573
push str.No_licensing_environment_variables_were_found._n
jmp 0x4036fc
push esi
push edi
push str.Mentor_Graphics_licensing_variables_n
push 1
call fcn.00404aa0
add esp, 8
xor edi, edi
cmp byte [ebx], 0
mov esi, ebx
je 0x4035da
lea ecx, [ecx]
push 5
push str.MGLS_
push esi
call fcn.00416c26
add esp, 0xc
test eax, eax
jne 0x4035b9
push esi
push str.___s_n
push 1
call fcn.00404aa0
add esp, 0xc
mov edi, 1
test esi, esi
jne 0x4035c1
xor eax, eax
jmp 0x4035cf
push 0x7fff
push esi
call fcn.00415bdd
add esp, 8
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
jne 0x403590
push 0x1000
lea eax, [esp + 0x10]
push eax
push str.MGC_HOME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jle 0x403610
cmp eax, 0x1000
ja 0x403610
lea ecx, [esp + 0xc]
push ecx
push str.__MGC_HOME_s_n
push 1
call fcn.00404aa0
add esp, 0xc
jmp 0x403623
test edi, edi
jne 0x403623
push str.__None_found_n
push 1
call fcn.00404aa0
add esp, 8
push str._nFLEXnet_licensing_variables_n
push 1
call fcn.00404aa0
add esp, 8
xor edi, edi
cmp byte [ebx], 0
mov esi, ebx
je 0x40368a
jmp 0x403640
push 7
push str.FLEXLM_
push esi
call fcn.00416c26
add esp, 0xc
test eax, eax
jne 0x403669
push esi
push str.___s_n
push 1
call fcn.00404aa0
add esp, 0xc
mov edi, 1
test esi, esi
jne 0x403671
xor eax, eax
jmp 0x40367f
push 0x7fff
push esi
call fcn.00415bdd
add esp, 8
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
jne 0x403640
cmp byte [ebx], 0
mov esi, ebx
je 0x4036db
push 3
push 0x43061c
push esi
call fcn.00416c26
add esp, 0xc
test eax, eax
jne 0x4036ba
push esi
push str.___s_n
push 1
call fcn.00404aa0
add esp, 0xc
mov edi, 1
test esi, esi
jne 0x4036c2
xor eax, eax
jmp 0x4036d0
push 0x7fff
push esi
call fcn.00415bdd
add esp, 8
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
jne 0x403691
test edi, edi
pop edi
pop esi
jne 0x4036f0
push str.__None_found_n
push 1
call fcn.00404aa0
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
push 0x4304e0
push 1
call fcn.00404aa0
add esp, 8
pop ebx
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.004152b4
add esp, 0x1004
ret
Function at 0x4038a0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x108
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x104], eax
cmp dword [0x43c5fc], 0
je 0x403a9f
push ebx
push esi
push str.mgls.dll_search_path_n
push 1
xor esi, esi
call fcn.00404aa0
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
add esp, 8
push 0x104
lea eax, [esp + 0xc]
push eax
push str.MGLS_DLL
call ebx
test eax, eax
jle 0x403941
lea ecx, [esp + 8]
push esi
push ecx
call fcn.00416ce6
add esp, 8
test eax, eax
jne 0x403923
push str.____MGLS_DLL____________________________FOUND
push 1
call fcn.00404aa0
push 0x4304e0
push 1
call fcn.00404aa0
add esp, 0x10
mov esi, 1
jmp 0x403932
push str.____MGLS_DLL____________________________NOT_FOUND_n
push 1
call fcn.00404aa0
add esp, 8
push str._____Note:__Customers_should_NOT_set_MGLS_DLL_n
push 1
call fcn.00404aa0
add esp, 8
test edi, edi
je 0x40396c
push edi
test esi, esi
je 0x403958
push str.__client_specified_location:__s_IGNORED_n
push 1
call fcn.00404aa0
jmp 0x403969
push str.__client_specified_location:__s_n
push 1
call fcn.00404aa0
mov esi, 1
add esp, 0xc
push 0x104
lea edx, [esp + 0xc]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x403a09
lea eax, [esp + 8]
push 0x5c
push eax
call fcn.004168f0
add esp, 8
push str.mgls.dll
test eax, eax
je 0x4039b6
lea ecx, [esp + 0xc]
push 0x104
push ecx
mov byte [eax + 1], 0
call fcn.004161f1
add esp, 0xc
jmp 0x4039cd
push str.._s
lea edx, [esp + 0x10]
push 0x104
push edx
call fcn.004161b2
add esp, 0x10
cmp byte [esp + 8], 0x22
lea eax, [esp + 8]
jne 0x4039dc
lea eax, [esp + 9]
push 0
push eax
call fcn.00416ce6
add esp, 8
test eax, eax
jne 0x403a09
test esi, esi
je 0x4039f6
push str.___App_Path_mgls.dll_________________FOUND__but_ignored_n
jmp 0x403a0e
push str.___App_Path_mgls.dll_________________FOUND_n
push 1
call fcn.00404aa0
mov esi, 1
jmp 0x403a15
push str.___App_Path_mgls.dll_________________NOT_FOUND_n
push 1
call fcn.00404aa0
add esp, 8
push 0x104
lea eax, [esp + 0xc]
push eax
push str.MGC_HOME
call ebx
test eax, eax
jle 0x403a7a
push str.lib_
lea ecx, [esp + 0xc]
push 0x104
push ecx
call fcn.004161f1
push str.mgls.dll
lea edx, [esp + 0x18]
push 0x104
push edx
call fcn.004161f1
lea eax, [esp + 0x20]
push 0
push eax
call fcn.00416ce6
add esp, 0x20
test eax, eax
jne 0x403a7a
test esi, esi
je 0x403a73
push str.____MGC_HOME__libmgls.dll_____________FOUND__but_ignored_n
jmp 0x403a7f
push str.____MGC_HOME__libmgls.dll_____________FOUND_n
jmp 0x403a7f
push str.____MGC_HOME__libmgls.dll_____________NOT_FOUND_n
push 1
call fcn.00404aa0
add esp, 8
push 0x4304e0
push 1
call fcn.00404aa0
add esp, 8
call fcn.00404950
pop esi
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004152b4
add esp, 0x108
ret
Function at 0x403b50
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x124
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x120], eax
cmp dword [0x43c5f8], 0
jne 0x403c66
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x104
lea eax, [esp + 0x24]
push eax
push str.MGLS_DEBUG_LOG_DIR
mov dword [0x43c5f8], 1
call esi
test eax, eax
je 0x403c65
push str._n
push 1
mov dword [0x43c5fc], 1
call fcn.00404aa0
push str._MGLS_Debug_Log_File_n
push 1
call fcn.00404aa0
push str._n_n
push 1
call fcn.00404aa0
lea ecx, [esp + 0x1c]
push 0x1a
push ecx
call fcn.00403390
add esp, 0x20
test eax, eax
jne 0x403bf0
lea edx, [esp + 4]
push edx
push str.Log_File_Created:_____s
push 1
call fcn.00404aa0
add esp, 0xc
push 0x104
lea eax, [esp + 0x24]
push eax
push str.MGLS_DEBUG_LOG_DIR
call esi
test eax, eax
jle 0x403c19
lea ecx, [esp + 0x20]
push ecx
push str.Log_File_Directory:___s_n
push 1
call fcn.00404aa0
add esp, 0xc
push 0x104
lea edx, [esp + 0x24]
push edx
push str.MGLS_DEBUG_LEVEL
call esi
test eax, eax
jle 0x403c42
lea eax, [esp + 0x20]
push eax
push str.Debug_Level:_________s_n
push 1
call fcn.00404aa0
add esp, 0xc
push 0x4304e0
push 1
call fcn.00404aa0
add esp, 8
call fcn.00403510
call fcn.004033e0
call fcn.00403800
call fcn.00404950
pop esi
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.004152b4
add esp, 0x124
ret
Function at 0x404ea0
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, eax
cmp esi, 0xffffffff
jne 0x404ec8
cmp dword [0x43d15c], 0
je 0x404ec4
mov eax, dword [0x43d160]
push str.Invalid_file_position_specified_to_read_cache_...__n
push eax
call fcn.0041716c
add esp, 8
xor eax, eax
pop esi
ret
test edi, edi
jne 0x404eec
cmp dword [0x43d15c], edi
je 0x404ec4
mov ecx, dword [0x43d160]
push str.Invalid_NULL_file_pointer_n
push ecx
call fcn.0041716c
add esp, 8
xor eax, eax
pop esi
ret
push edi
call fcn.00417fcc
push 1
push esi
push edi
call fcn.00417f47
add esp, 0x10
test eax, eax
je 0x404f23
cmp dword [0x43d15c], 0
je 0x404ec4
mov edx, dword [0x43d160]
push str.fseek_...__failed_in_read_cache_...__n
push edx
call fcn.0041716c
add esp, 8
xor eax, eax
pop esi
ret
push 0x30
call fcn.00417649
mov esi, eax
add esp, 4
test esi, esi
jne 0x404f52
cmp dword [0x43d15c], eax
je 0x404ec4
mov eax, dword [0x43d160]
push str.malloc_...__failed_in_read_cache_...__n
push eax
call fcn.0041716c
add esp, 8
xor eax, eax
pop esi
ret
push edi
push 1
push 0x30
push esi
call fcn.00417ea0
add esp, 0x10
test eax, eax
jne 0x404f88
cmp dword [0x43d15c], eax
je 0x404ec4
mov ecx, dword [0x43d160]
push str.fread_...__failed_in_read_cache_...__n
push ecx
call fcn.0041716c
add esp, 8
xor eax, eax
pop esi
ret
mov eax, esi
pop esi
ret

Function at 0x404f90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, eax
cmp esi, 0xffffffff
jne 0x404fbe
cmp dword [0x43d15c], 0
je 0x404fb9
mov eax, dword [0x43d160]
push str.Invalid_file_position_specified_to_read_composites_...__n
push eax
call fcn.0041716c
add esp, 8
pop esi
xor eax, eax
pop ebp
ret
test ebp, ebp
jne 0x404fe3
cmp dword [0x43d15c], ebp
je 0x404fb9
mov ecx, dword [0x43d160]
push str.Invalid_NULL_file_pointer_n
push ecx
call fcn.0041716c
add esp, 8
pop esi
xor eax, eax
pop ebp
ret
push ebp
call fcn.00417fcc
push 1
push esi
push ebp
call fcn.00417f47
add esp, 0x10
test eax, eax
je 0x40501b
cmp dword [0x43d15c], 0
je 0x404fb9
mov edx, dword [0x43d160]
push str.fseek_...__failed_in_read_composites_...__n
push edx
call fcn.0041716c
add esp, 8
pop esi
xor eax, eax
pop ebp
ret
push ebx
mov ebx, dword [0x43d124]
push edi
mov edi, dword [0x43d130]
mov eax, edi
imul eax, ebx
push eax
call fcn.00417649
mov esi, eax
add esp, 4
test esi, esi
jne 0x405060
cmp dword [0x43d15c], eax
je 0x405059
mov ecx, dword [0x43d160]
push str.malloc_...__failed_in_read_composites_...__n
push ecx
call fcn.0041716c
add esp, 8
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
ret
push ebp
push ebx
push edi
push esi
call fcn.00417ea0
add esp, 0x10
cmp eax, dword [0x43d124]
je 0x4050a1
cmp dword [0x43d15c], 0
je 0x405091
mov edx, dword [0x43d160]
push str.fread_...__failed_to_read_the_expected_number_of_composites_in_read_composites_...__n
push edx
call fcn.0041716c
add esp, 8
push esi
call fcn.00415fdf
add esp, 4
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
ret
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
ret
Function at 0x4050b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4050de
cmp dword [0x43d15c], 0
je 0x4050d9
mov eax, dword [0x43d160]
push str.Invalid_file_position_specified_in_read_atomics_...__n
push eax
call fcn.0041716c
add esp, 8
pop esi
xor eax, eax
pop ebp
ret
push ebp
call fcn.00417fcc
push 1
push esi
push ebp
call fcn.00417f47
add esp, 0x10
test eax, eax
je 0x405116
cmp dword [0x43d15c], 0
je 0x4050d9
mov ecx, dword [0x43d160]
push str.fseek_...__failed_in_read_atomics_...__n
push ecx
call fcn.0041716c
add esp, 8
pop esi
xor eax, eax
pop ebp
ret
push ebx
mov ebx, dword [0x43d134]
mov edx, ebx
imul edx, edi
push edx
call fcn.00417649
mov esi, eax
add esp, 4
test esi, esi
jne 0x405152
cmp dword [0x43d15c], eax
je 0x40514c
mov eax, dword [0x43d160]
push str.malloc_...__failed_in_read_atomics_...__n
push eax
call fcn.0041716c
add esp, 8
pop ebx
pop esi
xor eax, eax
pop ebp
ret
push ebp
push edi
push ebx
push esi
call fcn.00417ea0
add esp, 0x10
cmp eax, edi
je 0x40518e
cmp dword [0x43d15c], 0
je 0x40517f
mov ecx, dword [0x43d160]
push str.Failed_to_read_expected_number_of_atomics_in_read_atomics_...__n
push ecx
call fcn.0041716c
add esp, 8
push esi
call fcn.00415fdf
add esp, 4
pop ebx
pop esi
xor eax, eax
pop ebp
ret
pop ebx
mov eax, esi
pop esi
pop ebp
ret
Function at 0x405420
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x168
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x164], eax
push ebx
push esi
mov esi, dword [esp + 0x174]
xor ebx, ebx
push edi
mov edi, dword [esp + 0x17c]
mov dword [esp + 0x1c], 0x4316e8
mov dword [esp + 0x20], 0x4316e4
mov dword [esp + 0x24], 0x4316e0
mov dword [esp + 0x28], 0x4316dc
mov dword [esp + 0x2c], 0x4316d8
mov dword [esp + 0x30], 0x4316d4
mov dword [esp + 0x34], 0x4316d0
mov dword [esp + 0x38], 0x4316cc
mov dword [esp + 0x3c], 0x4316c8
mov dword [esp + 0x40], 0x4316c4
mov dword [esp + 0x44], 0x4316c0
mov dword [esp + 0x48], 0x4316bc
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebx
cmp byte [edi], bl
jne 0x4054d5
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x164]
xor ecx, esp
call fcn.004152b4
add esp, 0x168
ret
push 0x100
lea eax, [esp + 0x74]
push ebx
push eax
call fcn.00415a70
push esi
lea ecx, [esp + 0x80]
push 0x100
push ecx
call fcn.00415aea
lea edx, [esp + 0x2c]
push edx
push 0xa
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0xa
lea edx, [esp + 0x78]
push edx
push 0xa
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0xa8]
push str._s__s__d__s__d
push ecx
call fcn.00417057
add esp, 0x40
lea edx, [esp + 0x4c]
push 0xa
push edx
call fcn.0041831f
add esp, 8
xor esi, esi
push ebp
mov ecx, dword [esp + esi*4 + 0x20]
lea eax, [esp + 0x50]
push eax
push ecx
call fcn.00404cc0
add esp, 8
test eax, eax
je 0x405567
inc esi
cmp esi, 0xc
jl 0x405541
mov eax, 1
jmp 0x4055ed
lea ebp, [esi + 1]
cmp ebp, 0xffffffff
je 0x4055d3
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
push 0xa
lea ecx, [esp + 0x5c]
push ecx
push str._s__d__d
push edi
call fcn.00417057
lea edx, [esp + 0x68]
push 0xa
push edx
call fcn.0041831f
add esp, 0x20
xor esi, esi
lea esp, [esp]
mov ecx, dword [esp + esi*4 + 0x20]
lea eax, [esp + 0x50]
push eax
push ecx
call fcn.00404cc0
add esp, 8
test eax, eax
je 0x4055be
inc esi
cmp esi, 0xc
jl 0x4055a0
jmp 0x4055c1
lea ebx, [esi + 1]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jl 0x4055d3
jg 0x4055dc
cmp ebp, ebx
jge 0x4055da
mov eax, 1
jmp 0x4055ed
jle 0x4055e0
xor eax, eax
jmp 0x4055ed
mov edx, dword [esp + 0x10]
xor eax, eax
cmp edx, dword [esp + 0x1c]
setl al
mov ecx, dword [esp + 0x174]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004152b4
add esp, 0x168
ret
Function at 0x405630
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x20c
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x208], eax
cmp dword [0x43d10c], 0
jne 0x405849
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x104
lea eax, [esp + 0x10c]
push eax
push str.MGLS_DEBUG_LOG_DIR
mov dword [0x43d10c], 1
call esi
test eax, eax
je 0x405848
push edi
push str.mgc.pkginfo_search_path_n
push 1
xor edi, edi
call fcn.00404aa0
add esp, 8
push 0x104
lea ecx, [esp + 0xc]
push ecx
push str.MGLS_PKGINFO_FILE
call esi
test eax, eax
jle 0x4056df
lea edx, [esp + 8]
push edi
push edx
call fcn.00416ce6
add esp, 8
test eax, eax
jne 0x4056c1
lea edi, [eax + 1]
push str.____MGLS_PKGINFO_FILE___________________FOUND_n
jmp 0x4056c6
push str.____MGLS_PKGINFO_FILE___________________NOT_FOUND_n
push 1
call fcn.00404aa0
add esp, 8
push str._____Note:__Usage_of_this_variable_is_not_recommended_n
push 1
call fcn.00404aa0
add esp, 8
push 0x104
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x405783
lea ecx, [esp + 8]
push 0x5c
push ecx
call fcn.004168f0
add esp, 8
test eax, eax
je 0x405728
push str.mgc.pkginfo
lea edx, [esp + 0xc]
push 0x104
push edx
mov byte [eax], 0
call fcn.004161f1
add esp, 0xc
jmp 0x405741
push 0xffffffffffffffff
push str..mgc.pkginfo
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.004159af
add esp, 0x10
lea ecx, [esp + 8]
push 0
push ecx
call fcn.00416ce6
add esp, 8
test eax, eax
jne 0x40577c
test edi, edi
je 0x405764
lea edx, [esp + 8]
push edx
push str.__Application_directory___s__________FOUND__but_ignored_n
jmp 0x40578d
lea eax, [esp + 8]
push eax
push str.__Application_directory___s__________FOUND_n
push 1
call fcn.00404aa0
mov edi, 1
jmp 0x405794
lea ecx, [esp + 8]
push ecx
jmp 0x405788
lea edx, [esp + 8]
push edx
push str.__Application_directory___s__________NOT_FOUND_n
push 1
call fcn.00404aa0
add esp, 0xc
push 0x104
lea eax, [esp + 0xc]
push eax
push str.MGC_HOME
call esi
test eax, eax
jle 0x4057e5
push 0x42f9f0
lea ecx, [esp + 0xc]
push 0x104
push ecx
call fcn.004161f1
lea edx, [esp + 0x14]
push 0
push edx
call fcn.00416ce6
add esp, 0x14
test eax, eax
jne 0x4057e5
test edi, edi
je 0x4057de
push str.____MGC_HOME__libmgc.pkginfo__________FOUND__but_ignored_n
jmp 0x4057ea
push str.____MGC_HOME__libmgc.pkginfo__________FOUND_n
jmp 0x4057ea
push str.____MGC_HOME__libmgc.pkginfo__________NOT_FOUND_n
push 1
call fcn.00404aa0
add esp, 8
push 0x4304e0
push 1
call fcn.00404aa0
push str.MGLS_PKGINFO_FILE
push str.SOFTWAREMentorGraphicsLicensing
call fcn.00402c90
mov esi, eax
add esp, 0x10
test esi, esi
je 0x405832
test edi, edi
je 0x405823
push str.__SOFTWAREMentorGraphicsLicensingMGLS_PKGINFO_FILE__________FOUND__but_ignored_n
jmp 0x405828
push str.__SOFTWAREMentorGraphicsLicensingMGLS_PKGINFO_FILE__________FOUND_n
push 1
call fcn.00404aa0
add esp, 8
push 0x4304e0
push 1
call fcn.00404aa0
push esi
call fcn.00415fdf
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004152b4
add esp, 0x20c
ret
Function at 0x405860
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x908
mov eax, dword [0x43b03c]
xor eax, esp
mov dword [esp + 0x904], eax
cmp dword [0x43d110], 0
jne 0x405966
push 0x104
lea eax, [esp + 0x404]
push eax
push str.MGLS_DEBUG_LOG_DIR
mov dword [0x43d110], 1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x405966
push str.mgc.pkginfo_in_use_n
push 1
call fcn.00404aa0
add esp, 8
test esi, esi
je 0x405932
lea ecx, [esi + 0x28]
push ecx
lea edx, [esp + 4]
push 0x400
push edx
mov byte [esp + 0xc], 0
call fcn.00415aea
lea eax, [esp + 0xc]
push eax
push str.__Date:______s_n
push 1
mov byte [esp + 0x30], 0
call fcn.00404aa0
mov eax, esi
add esp, 0x18
mov byte [esp + 0x504], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405900
push 0xffffffffffffffff
sub eax, edx
push esi
inc eax
push eax
lea ecx, [esp + 0x510]
push ecx
call fcn.004159af
lea edx, [esp + 0x514]
push edx
push str.__Version:___s_n
push 1
call fcn.00404aa0
add esp, 0x1c
test edi, edi
je 0x405948
push edi
push str.__Pathname:__s_n
push 1
call fcn.00404aa0
add esp, 0xc
jmp 0x405957
push str.__Pathname:_Unknown__mgc.pkginfo_file_is_corrupt_n
push 1
call fcn.00404aa0
add esp, 8
push 0x4304e0
push 1
call fcn.00404aa0
add esp, 8
mov ecx, dword [esp + 0x904]
xor ecx, esp
call fcn.004152b4
add esp, 0x908
ret