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

Disassembly:
push ebx
push esi
push 0x779f80
xor bl, bl
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x779ea4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x50b02b
push 0x4c
push 1
call fcn.0051fb55
mov esi, eax
add esp, 8
test esi, esi
jne 0x50aff3
push 0x779f80
mov bl, 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov al, bl
pop ebx
ret
mov ecx, dword [0x779ea4]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x76f228]
inc eax
lea edx, [esi + 0xc]
mov dword [0x76f228], eax
push edx
mov dword [esi + 0x30], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esi + 4]
push 0
push eax
call fcn.0050eaa0
add esp, 8
mov byte [esi + 0x3c], 1
push 0x779f80
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov al, bl
pop ebx
ret

Function at 0x50b4b0
Capabilities:
Read file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x1c], edi
call fcn.0051f72d
mov ebx, dword [esp + 0x14]
mov dword [eax], 0
mov eax, dword [esp + 0x18]
push edi
push eax
push ebx
call fcn.00521e7c
mov esi, eax
add esp, 0xc
cmp esi, edi
je 0x50b5aa
call fcn.0051f72d
cmp dword [eax], 0
je 0x50b4f7
call fcn.0051f72d
mov ebp, dword [eax]
jmp 0x50b4fa
or ebp, 0xffffffff
call fcn.0050b040
test esi, esi
mov dword [eax], ebp
jne 0x50b50f
call fcn.0051f72d
cmp dword [eax], 4
je 0x50b55f
mov eax, dword [esp + 0x20]
test al, 0x1a
je 0x50b542
cmp esi, 0xffffffff
je 0x50b584
test al, 6
je 0x50b542
call fcn.0050b040
mov ecx, dword [eax]
push ecx
push ebx
call fcn.0050ead0
add esp, 4
push eax
push 0x24
push 9
call fcn.0050b890
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp esi, 0xffffffff
je 0x50b5a2
test al, 6
je 0x50b550
test ah, 2
je 0x50b5a2
test esi, esi
jbe 0x50b5ae
test ah, 2
je 0x50b5ae
add dword [esp + 0x18], esi
sub edi, esi
call fcn.0051f72d
mov edx, dword [esp + 0x18]
push edi
push edx
push ebx
mov dword [eax], 0
call fcn.00521e7c
mov esi, eax
add esp, 0xc
cmp esi, edi
je 0x50b5aa
jmp 0x50b4e4
call fcn.0050b040
mov eax, dword [eax]
push eax
push ebx
call fcn.0050ead0
add esp, 4
push eax
push 0x24
push 2
call fcn.0050b890
add esp, 0x10
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
mov eax, dword [esp + 0x20]
test al, 6
je 0x50b5bb
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
test ah, 2
je 0x50b5c4
mov esi, dword [esp + 0x1c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret

Function at 0x521d14
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x521d34
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0051f6ba
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x521d57
test byte [esp + 8], 2
je 0x521d57
call fcn.0051f72d
mov dword [eax], 0xd
call fcn.0051f736
mov dword [eax], 5
jmp 0x521d30
xor eax, eax
ret
Function at 0x53a200
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x556880
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov al, byte [esp + 0x3c]
push ebx
xor ebx, ebx
push esi
mov esi, ecx
mov byte [esp + 0x10], al
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x44]
push ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x28], al
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
mov dword [esp + 0x24], edx
call fcn.0052f114
mov eax, dword [0x654000]
lea ecx, [esp + 0x10]
push eax
push ebx
push ecx
lea ecx, [esp + 0x30]
call fcn.0052f046
lea edx, [esp + 0x20]
lea eax, [esp + 8]
push edx
push eax
mov ecx, esi
mov byte [esp + 0x44], 1
call fcn.0053acb0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov dword [esp + 0xc], ecx
je 0x53a2a7
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x53a29e
cmp al, 0xff
je 0x53a29e
dec al
mov byte [ecx], al
jmp 0x53a2a7
push ecx
call fcn.005443a2
add esp, 4
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ebx
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
je 0x53a2d8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x53a2cf
cmp al, 0xff
je 0x53a2cf
dec al
mov byte [ecx], al
jmp 0x53a2d8
push ecx
call fcn.005443a2
add esp, 4
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0x10]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 4
Function at 0x546a18
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x546a50
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00544a93
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00544a6b
jmp 0x546a5c
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x548212
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x548254
call fcn.0054e448
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x548254
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x54824b
xor eax, eax
jmp 0x54825c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00548262
pop edi
pop esi
pop ebx
ret 4

Function at 0x54e978
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x54e9a6
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x54e9c4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0054e8de
jmp 0x54e9c4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x54e9c4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0054e8de
test edi, edi
mov eax, edi
jne 0x54e9ae
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401040
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x44
push ebp
push esi
xor ebp, ebp
lea eax, [esp + 0x14]
push 0x38
push str.1.2.11
push eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
call fcn.004084d0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x401094
mov eax, dword [esp + 0x54]
push esi
add eax, 0x12
push eax
push str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
call fcn.00402320
add esp, 0xc
or eax, 0xffffffff
pop esi
pop ebp
add esp, 0x44
ret
push 0x2000
call fcn.0040e8f0
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4010c8
mov eax, dword [esp + 0x54]
add eax, 0x12
push eax
push str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
push str.malloc
call fcn.004021c0
add esp, 0xc
jmp 0x40122e
push 0x2000
call fcn.0040e8f0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4010fa
mov ecx, dword [esp + 0x54]
add ecx, 0x12
push ecx
push str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
push str.malloc
call fcn.004021c0
add esp, 0xc
jmp 0x40122e
push ebx
mov ebx, dword [esp + 0x60]
xor eax, eax
push edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
mov edi, dword [edi + 8]
nop dword [eax]
test eax, eax
jb 0x401125
ja 0x40111e
cmp edi, 0x2000
jbe 0x401125
mov esi, 0x2000
jmp 0x401127
mov esi, edi
mov eax, dword [esp + 0x58]
push dword [eax]
push esi
push 1
push dword [esp + 0x20]
call fcn.0040beb2
add esp, 0x10
cmp eax, esi
jne 0x401229
mov eax, dword [esp + 0x58]
push dword [eax]
call fcn.0040bca0
add esp, 4
test eax, eax
jne 0x401229
sub edi, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], edi
sbb dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x2c], 0x2000
push 0
push eax
mov dword [esp + 0x30], ebp
call fcn.00406be0
mov edi, eax
add esp, 8
cmp edi, 0xfffffffc
jl 0x40119c
cmp edi, 0xfffffffe
jle 0x40120e
cmp edi, 2
je 0x401207
mov eax, dword [esp + 0x60]
mov esi, 0x2000
sub esi, dword [esp + 0x2c]
test eax, eax
je 0x4011d3
push eax
push esi
push 1
push ebp
call fcn.0040c4e3
add esp, 0x10
cmp eax, esi
jne 0x4011ce
push dword [esp + 0x60]
call fcn.0040bca0
add esp, 4
test eax, eax
je 0x4011e4
or edi, 0xffffffff
jmp 0x401213
test ebx, ebx
je 0x4011e4
push esi
push ebp
push ebx
call fcn.0040a280
add esp, 0xc
add ebx, esi
cmp dword [esp + 0x2c], 0
je 0x401170
cmp edi, 1
je 0x401252
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4011fe
cmp dword [esp + 0x18], eax
jbe 0x40120e
mov edi, dword [esp + 0x18]
jmp 0x401110
mov edi, 0xfffffffd
jmp 0x401213
cmp edi, 1
je 0x401252
mov eax, dword [esp + 0x5c]
push edi
add eax, 0x12
push eax
push str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
call fcn.00402320
add esp, 0xc
or esi, 0xffffffff
pop edi
pop ebx
lea eax, [esp + 0x14]
push eax
call fcn.00408320
push dword [esp + 0x10]
call fcn.0040e8d5
push ebp
call fcn.0040e8d5
add esp, 0xc
mov eax, esi
pop esi
pop ebp
add esp, 0x44
ret
xor esi, esi
jmp 0x40122c
Function at 0x401280
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0xc]
mov edx, dword [ebp]
test edx, edx
jne 0x4012c1
lea eax, [ebp + 0x70]
push 0x423260
push eax
call fcn.00403580
mov edx, eax
add esp, 8
mov dword [ebp], edx
test edx, edx
jne 0x4012c1
mov eax, dword [esp + 0x10]
add eax, 0x12
push eax
push str.Failed_to_extract__s:_failed_to_open_archive_file__n
call fcn.00402320
add esp, 8
xor eax, eax
pop ebp
pop ecx
ret
push ebx
mov ebx, dword [esp + 0x14]
xor eax, eax
push 0
mov ecx, dword [ebx + 4]
add ecx, dword [ebp + 8]
adc eax, dword [ebp + 0xc]
push eax
push ecx
push edx
call fcn.0040c2a9
add esp, 0x10
test eax, eax
jns 0x4012fe
lea eax, [ebx + 0x12]
push eax
push str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
push str.fseek
call fcn.004021c0
add esp, 0xc
xor eax, eax
pop ebx
pop ebp
pop ecx
ret
push esi
push edi
push dword [ebx + 0xc]
call fcn.0040e8f0
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
test esi, esi
jne 0x401330
push dword [ebx + 0xc]
lea ecx, [ebx + 0x12]
push ecx
push str.Failed_to_extract__s:_failed_to_allocate_data_buffer___u_bytes___n
push str.malloc
call fcn.004021c0
add esp, 0x10
jmp 0x4013ab
cmp byte [ebx + 0x10], 1
jne 0x401354
push esi
push 0
push ebx
push ebp
call fcn.00401040
add esp, 0x10
test eax, eax
je 0x4013ab
push esi
call fcn.0040e8d5
add esp, 4
xor esi, esi
jmp 0x4013ab
mov eax, esi
mov esi, dword [ebx + 0xc]
xor ebx, ebx
mov dword [esp + 0x10], eax
test esi, esi
je 0x4013a7
test ebx, ebx
jb 0x401378
ja 0x401371
cmp esi, 0x2000
jbe 0x401378
mov edi, 0x2000
jmp 0x40137a
mov edi, esi
push dword [ebp]
push 1
push edi
push eax
call fcn.0040beb2
add esp, 0x10
cmp eax, 1
jb 0x4013ca
mov eax, dword [esp + 0x10]
sub esi, edi
sbb ebx, 0
add eax, edi
mov dword [esp + 0x10], eax
test ebx, ebx
ja 0x401371
jb 0x4013a7
test esi, esi
jne 0x401363
mov esi, dword [esp + 0x18]
mov eax, dword [ebp]
test eax, eax
je 0x4013c2
push eax
call fcn.0040bbf0
add esp, 4
mov dword [ebp], 0
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
pop ecx
ret
mov eax, dword [esp + 0x1c]
add eax, 0x12
push eax
push str.Failed_to_extract__s:_failed_to_read_data_chunk__n
push str.fread
call fcn.004021c0
mov esi, dword [esp + 0x24]
add esp, 0xc
push esi
call fcn.0040e8d5
add esp, 4
xor esi, esi
jmp 0x4013ab
Function at 0x401400
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x14]
push ebp
call fcn.00405a40
add esp, 4
cmp eax, 0xffffffff
jne 0x40141d
or eax, eax
pop ebp
add esp, 0xc
ret
push ebx
push esi
mov esi, dword [esp + 0x20]
lea eax, [ebp + 0x3070]
push edi
lea ebx, [esi + 0x12]
push ebx
push eax
mov dword [esp + 0x1c], ebx
call fcn.00405d10
mov edi, eax
add esp, 8
mov dword [esp + 0x18], edi
test edi, edi
jne 0x401463
push ebx
push str.Failed_to_extract__s:_failed_to_open_target_file__n
push str.fopen
call fcn.004021c0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
pop ebp
add esp, 0xc
ret
mov edx, dword [ebp]
test edx, edx
jne 0x40149a
lea eax, [ebp + 0x70]
push 0x423260
push eax
call fcn.00403580
mov edx, eax
add esp, 8
mov dword [ebp], edx
test edx, edx
jne 0x40149a
push ebx
push str.Failed_to_extract__s:_failed_to_open_archive_file__n
call fcn.00402320
add esp, 8
or edi, 0xffffffff
jmp 0x4015c0
mov ecx, dword [esi + 4]
xor eax, eax
add ecx, dword [ebp + 8]
push 0
adc eax, dword [ebp + 0xc]
push eax
push ecx
push edx
call fcn.0040c2a9
add esp, 0x10
test eax, eax
jns 0x4014d1
push ebx
push str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
push str.fseek
call fcn.004021c0
add esp, 0xc
or edi, 0xffffffff
jmp 0x4015c0
cmp byte [esi + 0x10], 1
jne 0x4014eb
push 0
push edi
push esi
push ebp
call fcn.00401040
add esp, 0x10
mov edi, eax
jmp 0x4015c0
push 0x2000
xor edi, edi
call fcn.0040e8f0
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40151d
push ebx
push str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
push str.malloc
call fcn.004021c0
add esp, 0xc
or edi, 0xffffffff
jmp 0x4015c0
mov esi, dword [esi + 0xc]
xor ebx, ebx
test esi, esi
je 0x4015b7
nop word [eax + eax]
test ebx, ebx
jb 0x401545
ja 0x40153e
cmp esi, 0x2000
jbe 0x401545
mov edi, 0x2000
jmp 0x401547
mov edi, esi
push dword [ebp]
push 1
push edi
push eax
call fcn.0040beb2
add esp, 0x10
cmp eax, 1
jb 0x40159a
push dword [esp + 0x18]
push 1
push edi
push dword [esp + 0x1c]
call fcn.0040c4e3
add esp, 0x10
cmp eax, 1
jb 0x40158a
mov eax, dword [esp + 0x10]
sub esi, edi
sbb ebx, 0
test ebx, ebx
ja 0x40153e
jb 0x401586
test esi, esi
jne 0x401530
xor edi, edi
jmp 0x4015b3
push dword [esp + 0x14]
push str.Failed_to_extract__s:_failed_to_write_data_chunk__n
push str.fwrite
jmp 0x4015a8
push dword [esp + 0x14]
push str.Failed_to_extract__s:_failed_to_read_data_chunk__n
push str.fread
call fcn.004021c0
add esp, 0xc
or edi, 0xffffffff
mov eax, dword [esp + 0x10]
push eax
call fcn.0040e8d5
add esp, 4
mov eax, dword [ebp]
test eax, eax
je 0x4015d7
push eax
call fcn.0040bbf0
add esp, 4
mov dword [ebp], 0
push dword [esp + 0x18]
call fcn.0040bbf0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
add esp, 0xc
ret
Function at 0x405780
Capabilities:
Create directory
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.00409570
mov eax, dword [0x430004]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push edi
push 0
push eax
push 0
call fcn.00406970
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4057d8
push str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.00402320
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040955a
add esp, 0x4004
ret
push esi
push 0x1000
lea eax, [esp + 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov esi, eax
call fcn.0040e8d5
add esp, 4
test esi, esi
jne 0x40581f
push str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.00402320
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040955a
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.004067b0
add esp, 4
test eax, eax
lea eax, [esp + 8]
je 0x40583f
push eax
call fcn.00410284
add esp, 4
jmp 0x40584f
push 0x1000
push eax
push 0
call fcn.0040f90e
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x40587b
push str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402320
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040955a
add esp, 0x4004
ret
push ebx
push 0x2000
lea eax, [esp + 0x2010]
push 0
push eax
call fcn.0040a800
push 0x5c
push esi
call fcn.0040abc7
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, eax
add esp, 0x14
test edi, edi
je 0x4058e9
nop word [eax + eax]
mov ecx, edi
lea eax, [esp + 0x200c]
sub ecx, esi
sar ecx, 1
inc ecx
push ecx
push esi
push eax
call fcn.004102e3
add esp, 0xc
lea eax, [esp + 0x200c]
push 0
push eax
call ebx
lea eax, [edi + 2]
push 0x5c
push eax
call fcn.0040abc7
mov edi, eax
add esp, 8
test edi, edi
jne 0x4058b0
push 0
push esi
call ebx
mov ecx, dword [esp + 0x400c]
mov eax, esi
pop ebx
pop esi
pop edi
xor ecx, esp
call fcn.0040955a
add esp, 0x4004
ret
Function at 0x405910
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1004
call fcn.00409570
mov eax, dword [0x430004]
xor eax, esp
mov dword [esp + 0x1000], eax
mov eax, dword [esp + 0x1008]
push ebx
push esi
mov esi, dword [esp + 0x1018]
push edi
mov edi, dword [esp + 0x1018]
push 0x423260
push eax
call fcn.00403580
push esi
push edi
mov ebx, eax
call fcn.00405d10
add esp, 0x10
xor edi, edi
mov esi, eax
test ebx, ebx
je 0x405a0f
push ebx
test esi, esi
je 0x405a14
call fcn.0040bc74
add esp, 4
test eax, eax
jne 0x4059e6
nop dword [eax + eax]
push ebx
push 0x1000
lea eax, [esp + 0x14]
push 1
push eax
call fcn.0040beb2
add esp, 0x10
test eax, eax
jne 0x4059a9
push ebx
call fcn.0040bca0
add esp, 4
test eax, eax
je 0x4059cb
push ebx
jmp 0x4059db
push esi
push eax
lea eax, [esp + 0x14]
push 1
push eax
call fcn.0040c4e3
add esp, 0x10
test eax, eax
je 0x4059da
push esi
call fcn.0040bca0
add esp, 4
test eax, eax
jne 0x4059da
push ebx
call fcn.0040bc74
add esp, 4
test eax, eax
je 0x405980
jmp 0x4059e6
push esi
call fcn.00411a09
add esp, 4
or edi, 0xffffffff
push ebx
call fcn.0040bbf0
push esi
call fcn.0040bbf0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.0040955a
add esp, 0x1004
ret
test esi, esi
je 0x405a1c
push esi
call fcn.0040bbf0
add esp, 4
mov ecx, dword [esp + 0x100c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040955a
add esp, 0x1004
ret
Function at 0x405a90
Capabilities:
Get common file path
Set environment variable

Disassembly:
mov eax, 0x2028
call fcn.00409570
mov eax, dword [0x430004]
xor eax, esp
mov dword [esp + 0x2024], eax
mov eax, dword [esp + 0x202c]
push ebx
push ebp
mov ebp, dword [esp + 0x2038]
mov dword [esp + 8], eax
push esi
push edi
test ebp, ebp
je 0x405b0f
push 0x4255cc
call fcn.00405c60
push ebp
mov ebx, eax
call fcn.00405780
mov edi, eax
add esp, 8
test edi, edi
je 0x405bc7
push edi
push 0x4255d0
call fcn.004108ce
push edi
mov esi, eax
call fcn.0040e8d5
add esp, 0xc
test esi, esi
je 0x405b13
push str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
call fcn.00402320
add esp, 4
xor eax, eax
jmp 0x405c3d
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x34]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
push str._MEI_d
lea eax, [esp + 0x1c]
push 0x10
push eax
call fcn.00402190
add esp, 0x10
xor esi, esi
nop
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.004119ee
mov edi, eax
push edi
call fcn.00406810
add esp, 0xc
test eax, eax
je 0x405bcb
push edi
call fcn.0040e8d5
inc esi
add esp, 4
cmp esi, 5
jl 0x405b40
test ebp, ebp
je 0x405bc7
push 0
push 0x4255cc
push 0
call fcn.00406970
add esp, 0xc
mov edi, eax
push 0
test ebx, ebx
je 0x405bb7
push ebx
push 0
call fcn.00406970
mov esi, eax
push esi
push edi
call fcn.004108ce
push edi
call fcn.0040e8d5
push esi
call fcn.0040e8d5
push ebx
call fcn.0040e8d5
add esp, 0x20
xor eax, eax
jmp 0x405c3d
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
call fcn.0040e8d5
add esp, 4
xor eax, eax
jmp 0x405c3d
push 0x1000
push edi
push dword [esp + 0x18]
call fcn.00406a10
push edi
call fcn.0040e8d5
add esp, 0x10
test ebp, ebp
je 0x405c38
push 0
push 0x4255cc
push 0
call fcn.00406970
add esp, 0xc
mov edi, eax
push 0
test ebx, ebx
je 0x405c28
push ebx
push 0
call fcn.00406970
mov esi, eax
push esi
push edi
call fcn.004108ce
push edi
call fcn.0040e8d5
push esi
call fcn.0040e8d5
push ebx
call fcn.0040e8d5
add esp, 0x20
jmp 0x405c38
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
call fcn.0040e8d5
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x2034]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040955a
add esp, 0x2028
ret

Function at 0x405c60
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.00409570
mov eax, dword [0x430004]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push 0
push eax
push 0
call fcn.00406970
add esp, 0xc
lea ecx, [esp]
push 0x2000
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x405cf0
push 0x2000
lea eax, [esp + 0x2004]
push eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
lea eax, [esp + 4]
push eax
push 0
call fcn.00406a10
add esp, 0xc
test eax, eax
je 0x405cf0
cmp byte [eax], 0
je 0x405cf0
push eax
call fcn.00413498
add esp, 4
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040955a
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4000]
xor eax, eax
xor ecx, esp
call fcn.0040955a
add esp, 0x4004
ret
Function at 0x4060c0
Capabilities:
Set environment variable

Disassembly:
push esi
push edi
push 0
push dword [esp + 0x10]
push 0
call fcn.00406970
add esp, 0xc
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
mov esi, eax
call fcn.0040e8d5
add esp, 4
mov eax, esi
pop edi
pop esi
ret

Function at 0x4060f0
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
mov eax, 0x2068
call fcn.00409570
mov eax, dword [0x430004]
xor eax, esp
mov dword [esp + 0x2064], eax
mov eax, dword [esp + 0x206c]
push 0x1000
push eax
lea eax, [esp + 0x6c]
mov dword [esp + 8], 0
push eax
call fcn.00406970
push 1
push 0x16
call fcn.00411473
push 1
push 2
call fcn.00411473
push 1
push 0xf
call fcn.00411473
push 1
push 0x15
call fcn.00411473
add esp, 0x2c
mov dword [esp + 4], 0xc
lea eax, [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 1
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, 1
mov dword [esp + 0x24], 0
push 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x50], 0x101
mov word [esp + 0x54], ax
call fcn.0040ea40
push eax
call fcn.004134ec
push eax
call fcn.00410ff8
push 1
mov dword [esp + 0x68], eax
call fcn.0040ea40
push eax
call fcn.004134ec
push eax
call fcn.00410ff8
push 2
mov dword [esp + 0x78], eax
call fcn.0040ea40
push eax
call fcn.004134ec
push eax
call fcn.00410ff8
add esp, 0x24
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0
push 1
push 0
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x406247
push 0xffffffffffffffff
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp]
mov ecx, dword [esp + 0x2064]
xor ecx, esp
call fcn.0040955a
add esp, 0x2068
ret
push str.Error_creating_child_process__n
push 0x4256d4
call fcn.00402270
mov ecx, dword [esp + 0x206c]
add esp, 8
xor ecx, esp
or eax, 0xffffffff
call fcn.0040955a
add esp, 0x2068
ret