joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402200
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
movzx eax, byte [ebp + 0xc]
mov dword [ebp - 0xc], 0x9f70
sub dword [ebp - 0xc], eax
push ebx
mov dword [ebp - 0x10], eax
or dword [ebp - 0x10], 0x12c67521
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp + 8]
push esi
push edi
movzx edi, byte [ebp + 0xb]
mov byte [ebp - 1], 0
mov dword [ebp - 8], 8
mov dword [ebp - 0x14], eax
push 0
call dword [0x412458]
mov ecx, eax
mov eax, dword [ebp - 0x18]
xor eax, edi
xor eax, dword [ebp - 8]
xor edx, edx
mov esi, 0x1beffbef
div esi
mov esi, 0x63be9aff
and ecx, 0x6a40422
or ecx, 0x4912aa49
mov bl, byte [ebp + 8]
push 0
mov eax, edx
xor edx, edx
div esi
mov eax, edx
or eax, dword [ebp - 0x14]
xor edx, edx
div ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [0x425158]
dec dword [ebp - 8]
or eax, edi
add eax, dword [ebp - 0x14]
add eax, edx
lea esi, [ecx + eax - 0x6d]
mov cl, byte [ebp - 8]
mov al, byte [ebp + 0xc]
shr al, cl
shr bl, cl
xor edx, edx
mov ecx, 0x8a9bfbb9
and al, 1
and bl, 1
add bl, al
movzx eax, bl
div ecx
mov eax, 0x65d3317a
and bl, 1
movzx edi, bl
mov ecx, edx
imul ecx, dword [ebp - 8]
xor edx, edx
or ecx, 0xad14bda9
div ecx
xor edx, edx
mov ecx, edi
or ecx, 0xaae8bd27
add esi, eax
mov eax, 0x13b36045
div ecx
xor edx, edx
div dword [ebp - 0x10]
mov eax, 0x5c7950f7
and edx, dword [ebp - 0x14]
sub eax, edx
add esi, eax
mov al, byte [ebp - 1]
add al, al
add al, bl
mov dword [0x425158], esi
mov byte [ebp - 1], al
call dword [0x412474]
mov ecx, dword [ebp - 8]
and eax, 0x4431
or ecx, 0xdbc7518f
xor edx, edx
div ecx
mov ecx, eax
mov eax, dword [ebp - 8]
sub eax, ecx
or eax, edi
add dword [0x425158], eax
cmp dword [ebp - 8], 0
jne 0x40223a
mov ecx, dword [ebp - 0x18]
or ecx, 0x739d47a7
movzx eax, bl
xor edx, edx
div ecx
mov eax, 0x546c1215
pop edi
pop esi
pop ebx
mov ecx, edx
or ecx, 0xd3c9e6bf
xor edx, edx
div ecx
add dword [0x425158], eax
mov al, byte [ebp - 1]
leave
ret

Function at 0x402966
Capabilities:
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x25a2f4ee
push esi
xor esi, esi
or dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
rdtsc
push ecx
pop dword [ebp - 0x18]
xor eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
xor eax, dword [ebp - 0x10]
xor dword [ebp - 8], 0x25a2f4ee
call dword [0x412360]
mov cx, cx
rdtsc
mov dx, dx
xor eax, dword [0x41a118]
mov dword [ebp - 0xc], eax
not dword [ebp - 0xc]
not eax
push 0
call dword [0x412354]
lea esp, [esp]
rdtsc
push eax
pop dword [ebp - 0x20]
xor eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
not dword [ebp - 4]
not eax
inc esi
cmp esi, 0xa
jg 0x4029ec
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
sub eax, ecx
sub ecx, dword [ebp - 8]
xor edx, edx
div ecx
cmp eax, 0xa
jb 0x40297e
xor eax, eax
inc eax
pop esi
leave
ret
xor eax, eax
jmp 0x4029e9
Function at 0x4023c8
Capabilities:
Resolve function by parsing pe exports

Disassembly:
add ebx, esi
mov edx, dword [esi + ecx + 0x1c]
mov dword [esp + 0x18], edx
mov ecx, dword [esi + ecx + 0x24]
mov dword [esp + 0x1c], ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [ebx + edx*4]
add edi, esi
mov ebp, 0xffffffff
xor ecx, ecx
nop
nop
nop
nop
mov esi, ecx
cmp byte [edi + ebp + 1], 0
lea ebp, [ebp + 1]
lea ecx, [ecx + 1]
jne 0x4023f6
test ebp, ebp
je 0x402436
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
imul ebp, eax
movzx ecx, byte [edi]
add ebp, ecx
inc edi
dec esi
jne 0x402416
cmp ebp, dword [esp]
jne 0x40243d
jmp fcn.00402444
xor ebp, ebp
cmp ebp, dword [esp]
je fcn.00402444
inc edx
mov esi, dword [esp + 4]
jmp 0x4023e6

Function at 0x40335c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00405be4
test esi, esi
jne 0x403394
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00405d20
jmp 0x4033b2
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004032a0
mov edi, eax
test esi, esi
je 0x4033b2
cmp dword [ebx], 0
je 0x4033b2
dec esi
jmp 0x40339b
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x403ae0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x4eb020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403b78
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x403b58
xor eax, eax
push ebp
push 0x403b51
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403bb0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403b58
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x4eb020]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x4eb020], ax
mov esp, ebp
pop ebp
ret
Function at 0x404a4c
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push esi
push edi
mov ebx, 0x4f6aec
cmp dword [ebp + 0xc], 2
jl 0x404a60
mov ebx, 0x4f6b1c
mov esi, ebx
lea edi, [ebp - 0x40]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
pop dword [ebx + 0x20]
pop dword [ebx + 0x1c]
pop dword [ebx + 0x18]
mov dword [ebx + 0x14], ebp
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], edx
lea ecx, [ebp - 0x40]
mov dword [ebx], ecx
call sub.kernel32.dll_GetCurrentThreadId
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 8]
xor ecx, ecx
cmp dword [ebp + 0xc], 0
jne 0x404a98
mov ecx, dword [eax]
mov dword [ebx + 0xc], ecx
mov eax, 0x401264
mov dword [0x4f4014], eax
mov eax, 0x40126c
mov dword [0x4f4018], eax
mov eax, ebx
call fcn.00404938
mov eax, dword [ebp + 0xc]
inc eax
mov byte [ebx + 0x28], al
dec eax
pop ecx
mov edx, dword [ecx]
mov dword [ebx + 0x24], edx
je 0x404acd
cmp al, 3
jge 0x404acd
call dword [ecx + eax*4]
push ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x404ade
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call ecx
pop ecx
mov eax, dword [ebp + 0xc]
cmp al, 3
jl 0x404ae9
call dword [ecx + eax*4]
cmp dword [0x4f4038], 0
jne 0x404aff
mov byte [0x4f4040], 1
fnstcw word [0x4eb020]
mov eax, dword [ebp + 0xc]
dec eax
jne fcn.00404d7c
call fcn.004049e4
ret 4

Function at 0x404cec
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4f4054], 0
je 0x404d4d
cmp word [0x4f4330], 0xd7b2
jne 0x404d15
cmp dword [0x4f4338], 0
jbe 0x404d15
mov eax, 0x4f432c
call dword [0x4f4348]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404d78
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4eb02c], 0
jne 0x404d69
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404f18
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x4eb030], 0
je 0x404f3e
mov edx, esi
mov eax, ebx
call dword [0x4eb030]
jmp 0x404f4d
mov eax, 8
call fcn.00402fe8
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x4f4055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404ee0
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x40121e
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1714]
mov eax, 0x1794
call fcn.0040ede0
mov eax, dword [0x431920]
xor eax, ebp
mov dword [ebp + 0x1710], eax
mov eax, dword [ebp + 0x171c]
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0x1720]
xor edi, edi
cmp dword [ebp + 0x1728], ebx
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x6c], ebx
jl 0x401327
jg 0x401273
cmp dword [ebp + 0x1724], ebx
jbe 0x401327
mov ecx, dword [ebp + 0x1724]
sub ecx, dword [ebp - 0x6c]
mov eax, dword [ebp + 0x1728]
sbb eax, edi
js 0x40129a
jg 0x401290
cmp ecx, 0x1770
jbe 0x40129a
mov ecx, 0x1770
mov dword [ebp - 0x7c], ebx
jmp 0x40129d
mov dword [ebp - 0x7c], eax
push ebx
lea eax, [ebp - 0x64]
push eax
push ecx
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401360
mov eax, dword [ebp - 0x64]
cmp eax, ebx
je 0x401360
cmp byte [ebp + 0x172c], bl
je 0x4012db
xor ecx, ecx
cmp eax, ebx
jbe 0x4012db
xor byte [ebp + ecx - 0x60], 0x88
inc ecx
cmp ecx, eax
jb 0x4012d1
xor esi, esi
cmp eax, ebx
jbe 0x401305
push ebx
lea ecx, [ebp - 0x70]
push ecx
sub eax, esi
push eax
lea eax, [ebp + esi - 0x60]
push eax
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401341
add esi, dword [ebp - 0x70]
mov eax, dword [ebp - 0x64]
cmp esi, eax
jb 0x4012e1
add dword [ebp - 0x6c], eax
adc edi, ebx
cmp edi, dword [ebp + 0x1728]
jl 0x401273
jg 0x401327
mov eax, dword [ebp + 0x1724]
cmp dword [ebp - 0x6c], eax
jb 0x401273
xor eax, eax
mov ecx, dword [ebp + 0x1710]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040edc8
add ebp, 0x1714
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x64]
sub eax, esi
push eax
push str.WriteFile_failed__d__d
call fcn.0040bdec
add esp, 0xc
push 2
pop eax
jmp 0x401329
push edi
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x64]
push str.ReadFile_failed__d__d__I64d
call fcn.0040bdec
xor eax, eax
add esp, 0x14
inc eax
jmp 0x401329
Function at 0x403a9a
Capabilities:
Create directory

Disassembly:
push ebp
lea ebp, [esp - 0x1708]
mov eax, 0x1788
call fcn.0040ede0
mov eax, dword [0x431920]
xor eax, ebp
mov dword [ebp + 0x1704], eax
push ebx
push esi
push str.extracting_files
call fcn.0040be55
mov dword [esp], 0x7d2
call fcn.00403887
mov esi, eax
push esi
push 0x428cc8
mov dword [ebp - 0x80], esi
call fcn.0040be55
xor ebx, ebx
add esp, 0xc
cmp esi, ebx
jne 0x403aff
cmp byte [ebp + 0x1710], bl
je 0x403af8
mov byte [0x4400a0], bl
xor eax, eax
jmp 0x403c57
cmp byte [ebp + 0x1710], bl
je 0x403b0c
call fcn.0040d697
push edi
call fcn.0040106c
push ebx
push ebx
push dword [0x432ce8]
mov dword [ebp - 0x74], eax
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x7d3
call fcn.0040382c
mov dword [esp], 0x428cc4
push eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], ebx
call fcn.0040f6e0
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0x70], eax
jle 0x403c25
mov edi, 0x4400a0
cmp dword [ebp - 0x70], ebx
je 0x403c25
push dword [ebp - 0x70]
call fcn.0040e8b0
pop ecx
test eax, eax
je 0x403c25
push dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
push edi
push 0x428cbc
push eax
call fcn.0040f861
push 0x5c
push dword [ebp - 0x70]
call fcn.0040e7f0
mov esi, eax
add esp, 0x18
cmp esi, ebx
je 0x403bdf
push edi
call fcn.0040e8b0
sub esi, dword [ebp - 0x70]
lea ecx, [ebp + esi - 0x6b]
mov byte [ecx + eax], bl
lea eax, [ebp - 0x6c]
push eax
push str.creating_directory__S
call fcn.0040be55
add esp, 0xc
push ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x403bdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403bdf
lea eax, [ebp - 0x6c]
push eax
push str.failed_to_create_directory__S
call fcn.0040bdec
pop ecx
pop ecx
push dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
push edi
push 0x428cbc
push eax
call fcn.0040f861
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x74]
call fcn.0040274f
mov esi, eax
add esp, 0x18
cmp esi, ebx
jne 0x403c6e
inc dword [ebp - 0x78]
push 0x428cc4
push ebx
call fcn.0040f6e0
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x78]
cmp eax, dword [ebp - 0x80]
pop ecx
pop ecx
jl 0x403b53
push dword [ebp - 0x7c]
call fcn.0040eb88
pop ecx
push 1
push ebx
push ebx
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x74]
mov dword [0x432ce0], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.extracting_files_done
call fcn.0040be55
pop ecx
xor eax, eax
pop edi
mov ecx, dword [ebp + 0x1704]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040edc8
add ebp, 0x1708
leave
ret
lea eax, [ebp - 0x6c]
push eax
push str.Failed_to_extract__S
call fcn.0040bdec
push dword [ebp - 0x7c]
call fcn.0040eb88
add esp, 0xc
mov eax, esi
jmp 0x403c56
Function at 0x403fa7
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3024
call fcn.0040ede0
mov eax, dword [0x431920]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 1
push 0x428e34
push esi
call fcn.0040f7a1
add esp, 0xc
test eax, eax
je 0x404179
push esi
call fcn.0040e8b0
pop ecx
test eax, eax
je 0x404179
push esi
push 0x428e1c
call fcn.0040be55
push esi
call fcn.0040e8b0
add esp, 0xc
test eax, eax
je 0x404179
push edi
lea eax, [ebp - 0x2ee4]
push esi
push eax
call fcn.0040ecd0
lea eax, [ebp - 0x2ee4]
push eax
call fcn.0040e8b0
add esp, 0xc
cmp byte [ebp + eax - 0x2ee4], 0x5c
mov edi, 0x428e18
je 0x404040
lea eax, [ebp - 0x2ee4]
push edi
push eax
call fcn.0040ece0
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x2ee4]
push 0x428e14
push eax
call fcn.0040ece0
pop ecx
pop ecx
lea eax, [ebp - 0x3024]
push eax
lea eax, [ebp - 0x2ee4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404177
lea eax, [ebp - 0x2ff8]
push 0x428e34
push eax
call fcn.00410200
pop ecx
pop ecx
test eax, eax
je 0x40415a
lea eax, [ebp - 0x2ff8]
push 0x428e10
push eax
call fcn.00410200
pop ecx
pop ecx
test eax, eax
je 0x40415a
lea eax, [ebp - 0x1774]
push esi
push eax
call fcn.0040ecd0
lea eax, [ebp - 0x1774]
push eax
call fcn.0040e8b0
add esp, 0xc
cmp byte [ebp + eax - 0x1774], 0x5c
je 0x4040de
lea eax, [ebp - 0x1774]
push edi
push eax
call fcn.0040ece0
pop ecx
pop ecx
lea eax, [ebp - 0x2ff8]
push eax
lea eax, [ebp - 0x1774]
push eax
call fcn.0040ece0
test byte [ebp - 0x3024], 0x10
pop ecx
pop ecx
jbe 0x40413a
movzx eax, byte [ebp + 0xc]
push eax
lea eax, [ebp - 0x1774]
push eax
push str.attempting_to_remove__S___d_
call fcn.0040be55
add esp, 0xc
cmp byte [ebp + 0xc], 0
je 0x40412b
lea eax, [ebp - 0x1774]
push 0
push eax
call fcn.00403fa7
pop ecx
pop ecx
lea eax, [ebp - 0x1774]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x40415a
lea eax, [ebp - 0x1774]
push eax
push str.attempting_to_delete__S
call fcn.0040be55
pop ecx
pop ecx
lea eax, [ebp - 0x1774]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x3024]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404073
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040edc8
leave
ret

Function at 0x4042d3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4042f7
cmp dword [ebp - 8], 2
jae 0x404315
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.error__d_n
call fcn.0040be55
push str.Internal_Error:_readShort
call fcn.00403f67
add esp, 0xc
mov ax, word [ebp - 4]
leave
ret
Function at 0x404367
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push dword [ebp + 8]
call fcn.00404289
mov ebx, eax
cdq
sub eax, edx
mov esi, eax
sar esi, 1
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040e75d
pop ecx
pop ecx
mov edi, eax
xor eax, eax
push eax
mov word [edi + esi*2], ax
lea eax, [ebp - 4]
push eax
push ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4043b9
cmp dword [ebp - 4], ebx
jae 0x4043c4
push str.Internal_Error:_readWString
call fcn.00403f67
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404bb0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
mov edi, 0x1770
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x404bdc
push 1
push 1
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db6
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push edi
push esi
push 0x42905c
call ebp
test eax, eax
jbe 0x404c16
push 0x429048
push esi
call fcn.0040ece0
pop ecx
pop ecx
test eax, eax
je 0x404c16
push 1
push 0
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db5
push edi
push esi
push 0x42903c
call ebp
test eax, eax
jbe 0x404c59
push esi
call fcn.0040e8b0
pop ecx
mov ecx, edi
sub ecx, eax
push ecx
push esi
call fcn.0040e8b0
pop ecx
add eax, esi
push eax
push 0x429030
call ebp
test eax, eax
jbe 0x404c59
push 1
push 0
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db5
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push esi
call ebx
test eax, eax
jbe 0x404c8e
push 0x429028
push esi
call fcn.0040ece0
pop ecx
pop ecx
test eax, eax
je 0x404c8e
push 0
push 0
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push 0x429020
push esi
call fcn.0040ecd0
pop ecx
pop ecx
test eax, eax
je 0x404cb4
push 0
push 0
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push 0x429018
push esi
call fcn.0040ecd0
pop ecx
pop ecx
test eax, eax
je 0x404cda
push 0
push 0
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push edi
push esi
call ebx
xor ebx, ebx
test eax, eax
jbe 0x404cf7
push ebx
push ebx
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push 0x429018
push esi
call fcn.0040ecd0
pop ecx
pop ecx
test eax, eax
je 0x404d1c
push ebx
push 1
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push esi
push edi
mov byte [0x43e8ba], 1
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x404d3f
push ebx
push 1
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push edi
push esi
push 0x42905c
call ebp
test eax, eax
jbe 0x404d6c
push 0x429048
push esi
call fcn.0040ece0
pop ecx
pop ecx
test eax, eax
je 0x404d6c
push ebx
push ebx
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push edi
push esi
push 0x42903c
call ebp
test eax, eax
jbe 0x404da7
push esi
call fcn.0040e8b0
pop ecx
sub edi, eax
push edi
push esi
call fcn.0040e8b0
pop ecx
add eax, esi
push eax
push 0x429030
call ebp
test eax, eax
jbe 0x404da7
push ebx
push ebx
push esi
call fcn.00404ac0
add esp, 0xc
test al, al
jne 0x404db4
push ebx
push 0x3f7
call fcn.00403f90
pop ecx
pop ecx
pop ebx
pop ebp
pop edi
pop esi
ret
Function at 0x404db9
Capabilities:
Get common file path
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
mov edi, 0x1770
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x404de5
push 1
push 1
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fd0
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
push esi
push str.USERPROFILE
call ebp
test eax, eax
jbe 0x404e1f
push str.AppDataLocalTemp
push esi
call fcn.0040f5bc
pop ecx
pop ecx
test eax, eax
je 0x404e1f
push 1
push 0
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fcf
push edi
push esi
push str.HOMEDRIVE
call ebp
test eax, eax
jbe 0x404e63
push esi
call fcn.0040f07b
pop ecx
mov ecx, edi
sub ecx, eax
push ecx
push esi
call fcn.0040f07b
pop ecx
lea eax, [esi + eax*2]
push eax
push str.HOMEPATH
call ebp
test eax, eax
jbe 0x404e63
push 1
push 0
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fcf
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push edi
push esi
call ebx
test eax, eax
jbe 0x404e98
push 0x429088
push esi
call fcn.0040f5bc
pop ecx
pop ecx
test eax, eax
je 0x404e98
push 0
push 0
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push str.c:_temp
push esi
call fcn.0040f5ea
pop ecx
pop ecx
test eax, eax
je 0x404ebe
push 0
push 0
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push str.c:_tmp
push esi
call fcn.0040f5ea
pop ecx
pop ecx
test eax, eax
je 0x404ee4
push 0
push 0
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push edi
push esi
call ebx
xor ebx, ebx
test eax, eax
jbe 0x404f01
push ebx
push ebx
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push str.c:_tmp
push esi
call fcn.0040f5ea
pop ecx
pop ecx
test eax, eax
je 0x404f26
push ebx
push 1
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push esi
push edi
mov byte [0x43e8ba], 1
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x404f4d
push ebx
push 1
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push edi
push esi
push str.USERPROFILE
call ebp
test eax, eax
jbe 0x404f7a
push str.AppDataLocalTemp
push esi
call fcn.0040f5bc
pop ecx
pop ecx
test eax, eax
je 0x404f7a
push ebx
push ebx
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
push edi
push esi
push str.HOMEDRIVE
call ebp
test eax, eax
jbe 0x404fb6
push esi
call fcn.0040f07b
pop ecx
sub edi, eax
push edi
push esi
call fcn.0040f07b
pop ecx
lea eax, [esi + eax*2]
push eax
push str.HOMEPATH
call ebp
test eax, eax
jbe 0x404fb6
push ebx
push ebx
push esi
call fcn.00404b38
add esp, 0xc
test al, al
jne 0x404fce
xor eax, eax
mov word [esi], ax
cmp byte [esp + 0x18], al
je 0x404fce
push ebx
push 0x3f7
call fcn.00403f90
pop ecx
pop ecx
pop ebx
pop ebp
pop edi
pop esi
ret
Function at 0x40508a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x177c
call fcn.0040ede0
mov eax, dword [0x431920]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1774]
push eax
call fcn.00404fd3
lea eax, [ebp - 0x1774]
push eax
push 0x42917c
call fcn.0040be55
add esp, 0xc
push esi
push 0
push 0x429178
lea eax, [ebp - 0x1774]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405164
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetTempFileName_failed__last_error__d_
call fcn.0040be55
lea eax, [ebp - 0x1774]
push eax
call fcn.0040e8b0
add esp, 0xc
test eax, eax
jle 0x405128
mov al, byte [ebp + eax - 0x1775]
cmp al, 0x5c
je 0x405128
cmp al, 0x2f
je 0x405128
lea eax, [ebp - 0x1774]
push 0x428e18
push eax
call fcn.0040ece0
pop ecx
pop ecx
push edi
push 0
call fcn.00410186
pop ecx
mov edi, eax
mov dword [ebp - 0x1778], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
imul eax, edi
push eax
call fcn.00410657
call fcn.00410669
push eax
lea eax, [ebp - 0x1774]
push eax
push str._se4j_d
push esi
call fcn.0040f861
add esp, 0x14
pop edi
push esi
push str.tempFile_is__S
call fcn.0040be55
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040edc8
leave
ret