joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49d0a0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x49d1ba
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x49d19a
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
call fcn.004aaf64
call fcn.004ac0c0
call fcn.004a76b8
lea eax, [ebp - 0x10]
mov edx, 1
mov cl, 1
call fcn.0042da1c
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push 0x49d1cc
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x30]
push eax
mov eax, dword [eax]
call dword [eax + 0x88]
push 0x49d1dc
call sub.user32.dll_RegisterWindowMessageW
mov dword [0x4c22b8], eax
push 0x49d200
call sub.user32.dll_RegisterWindowMessageW
mov dword [0x4c22bc], eax
push 0x49d224
call sub.user32.dll_RegisterWindowMessageW
mov dword [0x4c22c0], eax
mov dl, 1
mov eax, dword [0x435a60]
call fcn.00440d2c
mov esi, eax
mov dword [ebx + 0x1c4], esi
mov byte [esi + 0x50], 1
mov eax, ebx
mov edx, dword [eax]
call dword [edx]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 4]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 8]
xor edx, edx
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x10]
cmp dword [ebx + 0x18], 0
jne 0x49d189
cmp dword [0x4bc264], 0xffffffff
je 0x49d189
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x18]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x14]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x49d1a4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x49d1c1
lea eax, [ebp - 0x10]
call fcn.00428370
ret

Function at 0x49e8c4
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
mov ebx, eax
xor eax, eax
push ebp
push 0x49e953
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 0x24], 0
je 0x49e93d
cmp dword [ebx + 0x18], 0
je 0x49e93d
lea edx, [ebp - 4]
mov eax, dword [ebx + 0x18]
call fcn.0047081c
cmp dword [ebp - 4], 0
jne 0x49e92c
mov eax, dword [ebx + 0x18]
call fcn.00470c4c
test al, al
je 0x49e92c
mov edx, dword [ebx + 0xf8]
mov eax, dword [ebx + 0x24]
call fcn.0047088c
push 4
mov eax, dword [ebx + 0x24]
mov eax, dword [eax + 0x423]
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [ebx + 0x24]
call fcn.00475c10
jmp 0x49e93d
push 0
mov eax, dword [ebx + 0x24]
mov eax, dword [eax + 0x423]
push eax
call sub.user32.dll_ShowWindow
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x49e95a
lea eax, [ebp - 4]
call fcn.00406b40
ret
Function at 0x4a9274
Capabilities:
Parse url

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
mov esi, ecx
mov ebx, edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
call fcn.00406c24
xor eax, eax
push ebp
push 0x4a9334
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x3c]
xor ecx, ecx
mov edx, 0x3c
call fcn.00404a64
push ebp
call fcn.004a91ac
pop ecx
xor eax, eax
push ebp
push 0x4a9317
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x3c], 0x3c
lea eax, [ebp - 0x3c]
push eax
push 0
push 0
mov eax, dword [ebp - 0x40]
call fcn.00407984
push eax
call sub.wininet.dll_InternetCrackUrlW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x41], al
mov eax, ebx
mov edx, dword [ebp - 0x2c]
call fcn.004079dc
mov eax, esi
mov edx, dword [ebp - 0x10]
call fcn.004079dc
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 8]
call fcn.004079dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a931e
push ebp
call fcn.004a9234
pop ecx
ret

Function at 0x4aa924
Capabilities:
Hash data with md5

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
xor ecx, ecx
mov edx, 0x58
call fcn.00404a64
mov dword [ebx], 0x67452301
mov dword [ebx + 4], 0xefcdab89
mov dword [ebx + 8], 0x98badcfe
mov dword [ebx + 0xc], 0x10325476
pop ebx
ret

Function at 0x4400c9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46c6d0
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x44010c
push str.SystemFunction040
push dword [0x46c6d0]
call edi
push str.SystemFunction041
push dword [0x46c6d0]
mov dword [0x46c6c0], eax
call edi
mov dword [0x46c6c4], eax
jmp 0x440111
mov eax, dword [0x46c6c4]
cmp dword [0x46c6c0], 0
je 0x440122
test eax, eax
jne 0x4401c9
push 0x46c6d4
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x4401d3
push str.CryptProtectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c0], 0
mov dword [0x46c6c8], eax
jne 0x440187
test eax, eax
jne 0x440187
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440171
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440178
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work138_s_srclibsdutilcryputil.cpp
call fcn.004038f5
jmp 0x4401d3
push str.CryptUnprotectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c4], 0
mov dword [0x46c6cc], eax
jne 0x4401c9
test eax, eax
jne 0x4401c9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4401bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4401c4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x44017b
mov dword [0x46c6d8], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x441394
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4413bb
xor eax, eax
jmp 0x4413d6
test byte [ebp - 4], 0x10
je 0x4413cf
mov eax, 1
jmp 0x4413d1
xor eax, eax
jmp 0x4413d6
pop edi
pop esi
pop ebx
leave
ret
Function at 0x45ddd0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x4c5ba8], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x45ddee
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4c5ba4], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x4c5ba0], bl
jne 0x45de48
cmp dword [0x1a10078], 0
je 0x45de36
mov edi, dword [0x1a10074]
sub edi, 4
cmp edi, dword [0x1a10078]
jb 0x45de36
mov eax, dword [edi]
test eax, eax
je 0x45de2b
call eax
sub edi, 4
cmp edi, dword [0x1a10078]
jae 0x45de23
push 0x47c030
push 0x47c028
call fcn.0045de80
add esp, 8
push 0x47c038
push 0x47c034
call fcn.0045de80
add esp, 8
test ebx, ebx
jne 0x45de6f
mov dword [0x4c5ba8], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret

Function at 0x45e250
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov eax, 0
jne 0x45e26a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x45e27d
push eax
call fcn.004654b0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x45e6f0
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
mov eax, 0
jne 0x45e70f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x45e722
push eax
call fcn.004654b0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x45f360
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov ebx, dword [esp + 0x118]
push edi
test ebx, ebx
je 0x45f3d3
push ebx
call fcn.0045f490
add esp, 4
test eax, eax
jne 0x45f3a1
xor eax, eax
pop edi
mov dword [0x4c5b64], 0xf
mov dword [0x4c5b60], 0xd
pop esi
pop ebx
add esp, 0x10c
ret
add bl, 0x40
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea ecx, [esp + 0x18]
lea ebx, [esp + 0x10]
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x2e
mov byte [esp + 0x13], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x45f3e3
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x45f482
inc eax
cmp eax, 0x104
ja 0x45f482
mov edx, dword [esp + 0x120]
test edx, edx
jne 0x45f434
mov ecx, dword [esp + 0x124]
cmp ecx, eax
jg 0x45f40f
mov ecx, eax
push ecx
call fcn.0045e320
add esp, 4
mov edx, eax
test edx, edx
jne 0x45f453
xor eax, eax
pop edi
mov dword [0x4c5b60], 0xc
pop esi
pop ebx
add esp, 0x10c
ret
cmp dword [esp + 0x124], eax
jge 0x45f453
xor eax, eax
pop edi
mov dword [0x4c5b60], 0x22
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
Function at 0x45f490
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
sub esp, 4
test eax, eax
jne 0x45f4a4
mov eax, 1
add esp, 4
ret
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0x5c
mov byte [esp + 3], 0
add al, 0x40
mov byte [esp], al
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x45f4d6
cmp eax, 1
je 0x45f4d6
mov eax, 1
add esp, 4
ret
xor eax, eax
add esp, 4
ret

Function at 0x45f520
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
mov eax, 0
jne 0x45f53c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x45f54f
push eax
call fcn.004654b0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x460410
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x4c60c0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x460437
add eax, 8
inc ecx
cmp eax, 0x4c6150
jb 0x460428
cmp dword [ecx*8 + 0x4c60c0], edx
lea ebx, [ecx*8]
jne 0x4605fb
cmp dword [0x4c5b4c], 1
je 0x4605b7
cmp dword [0x4c5b4c], 0
jne 0x46046e
cmp dword [0x4c5b50], 1
je 0x4605b7
cmp edx, 0xfc
je 0x4605fb
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x4604ab
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4604ef
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x47b768
push ebp
call fcn.0045db80
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x47b748
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x4c60c4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00466ab0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x1a0ef60], 0
je 0x4605cd
mov eax, dword [0x1a0ef60]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4605d7
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x4c60c4]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x460920
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x460945
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004654b0
add esp, 4
mov eax, 0xffffffff
ret
test al, 1
je 0x46096a
test byte [esp + 8], 2
je 0x46096a
mov dword [0x4c5b60], 0xd
mov dword [0x4c5b64], 5
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x460a40
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x1a0f060], edx
push ebx
push esi
push edi
push ebp
jbe 0x460c47
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x1a0ef60
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x460c47
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x460aa9
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x460aba
push 2
push 0
push edx
call fcn.00460610
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x460b56
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x460b8f
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x460b1d
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x460b0b
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x460af2
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x460b85
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x460add
jmp 0x460b8f
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x460b85
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x460b8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x460c36
cmp dword [esp + 0x10], 0
je 0x460be8
cmp dword [esp + 0x10], 5
jne 0x460bcb
mov dword [0x4c5b60], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x4c5b64], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.004654b0
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x460c12
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x460c12
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4c5b60], 0x1c
mov dword [0x4c5b64], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4c5b60], 9
mov dword [0x4c5b64], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x461150
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.0045e150
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x1a0f060], esi
jbe 0x46129d
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x1a0ef60]
test byte [edx + ecx*8 + 4], 1
je 0x46129d
push 1
push ebx
push esi
call fcn.00460610
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x46128d
push 2
push ebx
push esi
call fcn.00460610
add esp, 0xc
cmp eax, 0xffffffff
je 0x46128d
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x461233
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.00460c70
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x4611f6
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00460a40
add esp, 0xc
cmp eax, 0xffffffff
je 0x461212
sub ebp, eax
test ebp, ebp
jg 0x4611eb
jmp 0x461227
cmp dword [0x4c5b64], 5
jne 0x461225
mov dword [0x4c5b60], 0xd
mov ebx, eax
push edi
push esi
call fcn.00460c70
add esp, 8
jmp 0x461270
jge 0x461270
push 0
push ecx
push esi
call fcn.00460610
add esp, 0xc
push esi
call fcn.004608d0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x461270
mov dword [0x4c5b60], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4c5b64], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.00460610
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4c5b60], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
Function at 0x462140
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x4c6230], ebx
jne 0x46218f
call esi
cmp eax, ebx
mov edi, eax
je 0x46216d
mov dword [0x4c6230], 1
jmp 0x46218f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x462185
mov dword [0x4c6230], 2
jmp 0x46218f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4c6230], 1
jne 0x46223e
test edi, edi
jne 0x4621b2
call esi
mov edi, eax
test edi, edi
jne 0x4621b2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x4621cc
add esi, 2
cmp word [esi], 0
jne 0x4621ba
add esi, 2
cmp word [esi], 0
jne 0x4621ba
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x46222d
push ebp
call fcn.0045e320
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x46222d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x46221c
push ebx
call fcn.0045e290
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4c6230], 2
jne 0x4622c2
test ebx, ebx
jne 0x462261
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x462261
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x462276
inc ebp
cmp byte [ebp], 0
jne 0x462268
inc ebp
cmp byte [ebp], 0
jne 0x462268
sub ebp, ebx
inc ebp
push ebp
call fcn.0045e320
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x46229b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x4686d0
Capabilities:
Set environment variable

Disassembly:
sub esp, 4
cmp dword [esp + 8], 0
push ebx
push esi
push edi
push ebp
je 0x46890e
mov edx, dword [esp + 0x18]
push 0x3d
push edx
call fcn.004693a0
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x46890e
cmp ebp, dword [esp + 0x18]
je 0x46890e
cmp byte [ebp + 1], 1
sbb eax, eax
mov ecx, dword [0x4c5b88]
neg eax
mov dword [esp + 0x10], eax
cmp dword [0x4c5b8c], ecx
jne 0x46872d
push ecx
call fcn.00468980
add esp, 4
mov dword [0x4c5b88], eax
cmp dword [0x4c5b88], 0
jne 0x4687dd
cmp dword [esp + 0x1c], 0
je 0x468764
cmp dword [0x4c5b90], 0
je 0x468764
call fcn.00465560
test eax, eax
je 0x4687dd
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [esp + 0x10], 0
je 0x468775
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4c5b88], 0
jne 0x4687a9
push 4
call fcn.0045e320
add esp, 4
mov dword [0x4c5b88], eax
test eax, eax
jne 0x46879e
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x4c5b88]
mov dword [eax], 0
cmp dword [0x4c5b90], 0
jne 0x4687dd
push 4
call fcn.0045e320
add esp, 4
mov dword [0x4c5b90], eax
test eax, eax
jne 0x4687d2
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x4c5b90]
mov dword [eax], 0
mov esi, dword [0x4c5b88]
sub ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x18]
push ebp
push edx
call fcn.00468920
add esp, 8
mov edi, eax
test edi, edi
jl 0x468845
cmp dword [esi], 0
je 0x468845
cmp dword [esp + 0x10], 0
je 0x46883c
lea ebx, [esi + edi*4]
mov eax, dword [ebx]
push eax
call fcn.0045e290
add esp, 4
cmp dword [ebx], 0
je 0x468829
mov eax, dword [ebx + 4]
add ebx, 4
inc edi
mov dword [ebx - 4], eax
cmp dword [ebx], 0
jne 0x46881a
shl edi, 2
push edi
push esi
call fcn.0045ebd0
add esp, 8
test eax, eax
je 0x46888d
jmp 0x468888
mov edx, dword [esp + 0x18]
mov dword [esi + edi*4], edx
jmp 0x46888d
cmp dword [esp + 0x10], 0
jne 0x468904
test edi, edi
jge 0x468856
neg edi
lea eax, [edi*4 + 8]
push eax
push esi
call fcn.0045ebd0
add esp, 8
test eax, eax
jne 0x468878
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
lea ecx, [eax + edi*4]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
mov dword [ecx + 4], 0
mov dword [0x4c5b88], eax
cmp dword [esp + 0x1c], 0
je 0x4688fa
mov edi, dword [esp + 0x18]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.0045e320
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4688fa
mov edi, dword [esp + 0x18]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x10], 1
sbb eax, eax
lea ecx, [ebp + ebx]
mov byte [ecx], 0
lea ecx, [ecx + 1]
and eax, ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.0045e290
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x47acd0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
xor esi, esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x47ad06
cmp byte [esp + 5], 0x3a
jne 0x47ad06
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.0045eed0
add esp, 4
lea esi, [eax - 0x40]
mov eax, esi
pop esi
add esp, 0x104
ret