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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 1
xor edi, edi
pop esi
cmp ebx, esi
jl 0x1005ab43
cmp ebx, 8
jle 0x1005ab45
xor esi, esi
lea eax, [ebp - 0x10]
push eax
call fcn.1004faf9
pop ecx
mov ecx, eax
call fcn.10001b9f
push eax
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.1005931f
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.10001b7f
cmp dword [esi + 0x6af70], edi
lea ecx, [esi + 0x6af70]
lea eax, [esi + 0x6af78]
mov dword [eax], edi
jne 0x1005ab8e
mov dword [eax], 1
mov dword [ecx], 0x10000
push 0x1fffc
lea eax, [esi + 0x4af70]
push edi
push eax
mov dword [esi + 0x6af6c], edi
call fcn.1005e2e0
mov eax, ebx
add esp, 0xc
shl eax, 3
cmp ebx, 2
movzx ecx, word [eax + 0x10081e32]
mov dword [esi + 0x6af98], ecx
movzx ecx, word [eax + 0x10081e30]
mov dword [esi + 0x6af9c], ecx
movzx ecx, word [eax + 0x10081e34]
mov dword [esi + 0x6afa0], ecx
movzx eax, word [eax + 0x10081e36]
mov dword [esi + 0x6af94], eax
jg 0x1005abef
mov eax, dword [ebp + 0x10]
or byte [eax], 4
jmp 0x1005abfa
cmp ebx, 8
jl 0x1005abfa
mov eax, dword [ebp + 0x10]
or byte [eax], 2
lea ebx, [esi + 0x1af70]
push 0x10000
push ebx
push esi
mov dword [esi + 0x6af84], edi
mov dword [esi + 0x6af74], edi
call dword [esi + 0xc]
add esp, 0xc
cmp eax, edi
mov dword [esi + 0x6af90], eax
je 0x1005ac6a
cmp eax, 0xffffffff
je 0x1005ac6a
cmp eax, 0x106
mov dword [esi + 0x6af8c], edi
jae 0x1005ac3c
push esi
call fcn.1005ae99
pop ecx
mov dword [esi + 0x6af7c], edi
movzx eax, byte [ebx + edi]
mov ecx, dword [esi + 0x6af7c]
and eax, 0x7fff
and ecx, 0x3ff
shl ecx, 5
xor eax, ecx
inc edi
cmp edi, 2
mov dword [esi + 0x6af7c], eax
jb 0x1005ac42
jmp 0x1005ac7a
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1005bd74
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x1005bd82
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x10], 8
push esi
push edi
not eax
mov ecx, 0xff
jb 0x1005be63
mov edi, dword [ebp + 0x10]
push ebx
shr edi, 3
movzx ebx, byte [edx]
mov esi, eax
sub dword [ebp + 0x10], 8
and esi, ecx
xor esi, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [esi*4 + 0x10081e80]
xor eax, ebx
inc edx
mov esi, eax
movzx ebx, byte [edx]
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x10081e80]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x10081e80]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x10081e80]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x10081e80]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
movzx ebx, byte [edx + 1]
mov esi, dword [esi*4 + 0x10081e80]
shr eax, 8
xor esi, eax
inc edx
mov eax, esi
and eax, ecx
xor eax, ebx
movzx ebx, byte [edx + 1]
mov eax, dword [eax*4 + 0x10081e80]
shr esi, 8
xor eax, esi
inc edx
mov esi, eax
and esi, ecx
xor esi, ebx
shr eax, 8
mov esi, dword [esi*4 + 0x10081e80]
xor eax, esi
inc edx
dec edi
jne 0x1005bd9f
pop ebx
cmp dword [ebp + 0x10], 0
je 0x1005be84
movzx edi, byte [edx]
mov esi, eax
and esi, ecx
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x10081e80]
xor eax, esi
inc edx
dec dword [ebp + 0x10]
jne 0x1005be69
pop edi
pop esi
not eax
pop ebp
ret

Function at 0x1005be8a
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
mov edx, 0xff
mov esi, dword [ecx]
movzx edi, byte [esp + 0x10]
mov eax, esi
and eax, edx
xor eax, edi
shr esi, 8
mov eax, dword [eax*4 + 0x10081e80]
xor eax, esi
mov esi, dword [ecx + 8]
mov dword [ecx], eax
and eax, edx
add eax, dword [ecx + 4]
mov edi, esi
and edi, edx
imul eax, eax, 0x8088405
inc eax
mov dword [ecx + 4], eax
shr eax, 0x18
xor eax, edi
pop edi
shr esi, 8
mov eax, dword [eax*4 + 0x10081e80]
xor eax, esi
pop esi
mov dword [ecx + 8], eax
ret
Function at 0x1005c275
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x1005c2e9
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x1005c2a1
cmp dword [esi + 0x40], edi
jae 0x1005c2a1
push eax
call fcn.10078a57
pop ecx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jne 0x1005c2b6
lea eax, [edi + edi]
push eax
call fcn.10078a2e
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x3c]
call fcn.1005dba0
add esp, 0xc
test edi, edi
jbe 0x1005c2e6
mov eax, dword [esi + 0x3c]
mov al, byte [ebx + eax]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.1005bedd
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x1005c2c9
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x1005c318
mov eax, dword [esi + 0x24]
lea ebx, [eax + edi]
cmp ebx, dword [esi + 0x28]
jb 0x1005c304
mov dword [esi + 0x14], 0x30000
jmp 0x1005c33a
push edi
add eax, ecx
push edx
push eax
call fcn.1005dba0
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
jmp 0x1005c33c
mov eax, dword [esi + 4]
test eax, eax
je 0x1005c333
lea ecx, [ebp + 8]
push 0
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x1005c33c
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1005ede0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1005f86e
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x1005ee03
test byte [esp + 8], 2
je 0x1005ee03
call fcn.1005f8e1
mov dword [eax], 0xd
call fcn.1005f8ea
mov dword [eax], 5
jmp 0x1005eddc
xor eax, eax
ret
Function at 0x4029c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4433a8
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x467cb8]
xor eax, ebp
mov dword [ebp - 0x18], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x58], ecx
mov eax, dword [ebp - 0x58]
cmp dword [eax + 0x44], 0
je 0x402a00
mov ecx, dword [ebp - 0x58]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x402a0c
mov al, 1
jmp 0x402bb1
mov dword [ebp - 0x10], 8
call fcn.004019e0
push eax
mov eax, dword [ebp - 0x58]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x58]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 0x3c], eax
call fcn.004019e0
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x40]
push edx
call fcn.00401990
add esp, 8
movzx eax, al
test eax, eax
je 0x402a4f
xor al, al
jmp 0x402bb1
push 0
push 8
lea ecx, [ebp - 0x34]
call fcn.004022f0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x44]
push edx
lea ecx, [ebp - 0x34]
call fcn.004024a0
mov ecx, eax
call fcn.0043f500
mov esi, eax
lea ecx, [ebp - 0x34]
call fcn.00401a20
add esi, eax
push esi
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x34]
call fcn.004024a0
mov ecx, eax
call fcn.0043f500
push eax
mov ecx, dword [ebp - 0x58]
add ecx, 0x4c
push ecx
mov edx, dword [ebp - 0x58]
mov ecx, dword [edx + 0x44]
call dword [sym.imp.MSVCP100.dll_public:_int___thiscall_std::codecvt_char__char__int_::unshift_int___char___char___char___const]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x402acb
cmp dword [ebp - 0x5c], 1
je 0x402ad2
cmp dword [ebp - 0x5c], 3
je 0x402b6d
jmp 0x402b85
mov eax, dword [ebp - 0x58]
mov byte [eax + 0x49], 0
lea ecx, [ebp - 0x4c]
push ecx
lea ecx, [ebp - 0x34]
call fcn.004024a0
mov ecx, eax
call fcn.0043f500
mov edx, dword [ebp - 0x14]
sub edx, eax
mov dword [ebp - 0x38], edx
je 0x402b36
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x38]
push edx
push 1
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x34]
call fcn.004024a0
mov ecx, eax
call fcn.0043f500
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x38], eax
je 0x402b36
mov byte [ebp - 0x51], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00401230
mov al, byte [ebp - 0x51]
jmp 0x402bb1
mov ecx, dword [ebp - 0x58]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x402b59
mov byte [ebp - 0x52], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00401230
mov al, byte [ebp - 0x52]
jmp 0x402bb1
cmp dword [ebp - 0x38], 0
jne 0x402b6b
push 0
push 8
lea ecx, [ebp - 0x34]
call fcn.00402370
jmp 0x402b9d
mov byte [ebp - 0x53], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00401230
mov al, byte [ebp - 0x53]
jmp 0x402bb1
mov byte [ebp - 0x54], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00401230
mov al, byte [ebp - 0x54]
jmp 0x402bb1
jmp 0x402a62
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.004364d4
mov esp, ebp
pop ebp
ret
Function at 0x41dc80
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x467cb8]
xor eax, ebp
mov dword [ebp - 0x1c], eax
cmp dword [0x4686bc], 0
je 0x41dccf
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 2
call dword [0x4686bc]
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jle 0x41dcc2
mov eax, dword [ebp - 0x18]
jmp 0x41de37
cmp dword [ebp - 0x18], 0
jge 0x41dccf
xor eax, eax
jmp 0x41de37
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.MSVCR100.dll_strcmp
add esp, 8
test eax, eax
jne 0x41dcea
xor eax, eax
jmp 0x41de37
push 0x200
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.MSVCR100.dll__getcwd]
add esp, 8
mov edx, dword [ebp + 8]
push edx
call fcn.0041de50
add esp, 4
test eax, eax
je 0x41dd19
mov eax, 0xf
jmp 0x41de37
push 0x800
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x41dd3a
mov eax, 0x14
jmp 0x41de37
push 0x44e924
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x41dd6c
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, 0xf
jmp 0x41de37
push 0x44e928
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x41ddab
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, 0x10
jmp 0x41de37
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR100.dll_ftell]
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
push eax
push 1
push 0x800
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR100.dll_ftell]
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push eax
push 1
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCR100.dll_feof]
add esp, 4
test eax, eax
je 0x41ddab
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004364d4
mov esp, ebp
pop ebp
ret
Function at 0x41e3d0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x467cb8]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x4686bc], 0
je 0x41e426
push 0
mov eax, dword [ebp + 8]
push eax
push 5
call dword [0x4686bc]
add esp, 0xc
mov dword [ebp - 0x20c], eax
cmp dword [ebp - 0x20c], 0
jle 0x41e419
mov eax, dword [ebp - 0x20c]
jmp 0x41e497
cmp dword [ebp - 0x20c], 0
jge 0x41e426
xor eax, eax
jmp 0x41e497
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041dac0
add esp, 4
test eax, eax
je 0x41e43d
mov eax, 0x17
jmp 0x41e497
mov edx, dword [ebp + 8]
push edx
call sub.MSVCR100.dll_strlen
add esp, 4
cmp eax, 0x200
jb 0x41e457
mov eax, 5
jmp 0x41e497
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x208]
push ecx
call sub.MSVCR100.dll_strcpy
add esp, 8
lea edx, [ebp - 0x208]
push edx
call fcn.0041e210
add esp, 4
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 4
cmp eax, 0xffffffff
jne 0x41e495
mov eax, 0xd
jmp 0x41e497
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004364d4
mov esp, ebp
pop ebp
ret

Function at 0x41e5b0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x467cb8]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [0x4686bc], 0
je 0x41e609
push 0
mov eax, dword [ebp + 8]
push eax
push 6
call dword [0x4686bc]
add esp, 0xc
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0
jle 0x41e5f9
mov eax, dword [ebp - 0x40c]
jmp 0x41e6fd
cmp dword [ebp - 0x40c], 0
jge 0x41e609
xor eax, eax
jmp 0x41e6fd
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041dac0
add esp, 4
test eax, eax
je 0x41e636
push 0x200
lea edx, [ebp - 0x208]
push edx
call fcn.0041e4b0
add esp, 8
jmp 0x41e668
mov eax, dword [ebp + 8]
push eax
call sub.MSVCR100.dll_strlen
add esp, 4
cmp eax, 0x200
jb 0x41e655
mov eax, 5
jmp 0x41e6fd
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x208]
push edx
call sub.MSVCR100.dll_strcpy
add esp, 8
lea eax, [ebp - 0x208]
push eax
call fcn.0041e210
add esp, 4
lea ecx, [ebp - 0x208]
push ecx
call fcn.0041e130
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x41e694
mov eax, dword [ebp - 4]
jmp 0x41e6fd
push 0x44e954
lea edx, [ebp - 0x208]
push edx
push 0x44e958
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x408]
push ecx
call fcn.0041df80
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x41e6d2
mov eax, dword [ebp - 4]
jmp 0x41e6fd
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.MSVCR100.dll__rmdir]
add esp, 4
test eax, eax
je 0x41e6fa
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
push eax
call fcn.0041db10
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004364d4
mov esp, ebp
pop ebp
ret
Function at 0x420d50
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push 0x44ee5c
mov eax, dword [ebp + 8]
push eax
call sub.MSVCR100.dll_strcmp
add esp, 8
test eax, eax
jne 0x420d75
call fcn.004214d0
jmp 0x420e74
push str.WNCZONE
mov ecx, dword [ebp + 8]
push ecx
call sub.MSVCR100.dll_strcmp
add esp, 8
test eax, eax
jne 0x420d8f
call fcn.004219f0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x420dad
mov eax, dword [ebp - 4]
jmp 0x420e74
cmp dword [0x469514], 0
jne 0x420dbb
call fcn.00420e80
push 0x44ee68
mov eax, dword [0x469514]
push eax
call fcn.0041f440
add esp, 8
mov word [ebp - 8], ax
movsx ecx, word [ebp - 8]
test ecx, ecx
jge 0x420de1
xor eax, eax
jmp 0x420e74
mov edx, dword [ebp + 8]
push edx
movzx eax, word [ebp - 8]
push eax
mov ecx, dword [0x469514]
push ecx
call fcn.0041fb00
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x420e71
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], edx
jmp 0x420e13
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
test edx, edx
je 0x420e1f
jmp 0x420e0a
mov eax, dword [ebp - 0xc]
sub eax, 1
mov dword [ebp - 0xc], eax
jmp 0x420e33
mov ecx, dword [ebp - 0xc]
sub ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 4]
jb 0x420e52
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax]
cmp ecx, 0x20
jg 0x420e52
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
test eax, eax
jl 0x420e52
jmp 0x420e2a
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
test eax, eax
je 0x420e71
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov byte [edx], 0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x421a10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0x44ee6c
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCR100.dll_strcmp
add esp, 8
test eax, eax
jne 0x421a52
push str.WNCTMPDIR
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
test eax, eax
je 0x421a50
push str.from_environment_variable_WNCTMPDIR
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 8
xor eax, eax
jmp 0x421a90
jmp 0x421a79
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
test eax, eax
je 0x421a79
push str.from_environment
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 8
xor eax, eax
jmp 0x421a90
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [0x469514]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0041f3b0
add esp, 0xc
pop ebp
ret

Function at 0x421b10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x467cb8]
xor eax, ebp
mov dword [ebp - 0xc], eax
cmp dword [ebp + 8], 0
jne 0x421b30
xor eax, eax
jmp 0x421c68
mov eax, dword [ebp + 8]
push eax
push 0x44eeb8
lea ecx, [ebp - 0x190]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x190]
push edx
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x421b6a
mov eax, dword [ebp - 4]
jmp 0x421c68
cmp dword [0x469514], 0
jne 0x421b78
call fcn.00420e80
push 0x44eec0
mov eax, dword [0x469514]
push eax
call fcn.0041f440
add esp, 8
mov word [ebp - 8], ax
movsx ecx, word [ebp - 8]
test ecx, ecx
jge 0x421b9e
xor eax, eax
jmp 0x421c68
mov edx, dword [ebp + 8]
push edx
movzx eax, word [ebp - 8]
push eax
mov ecx, dword [0x469514]
push ecx
call fcn.0041fb00
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x421c65
mov edx, dword [ebp - 4]
mov dword [ebp - 0x194], edx
jmp 0x421bdd
mov eax, dword [ebp - 0x194]
add eax, 1
mov dword [ebp - 0x194], eax
mov ecx, dword [ebp - 0x194]
movsx edx, byte [ecx]
test edx, edx
je 0x421bec
jmp 0x421bce
mov eax, dword [ebp - 0x194]
sub eax, 1
mov dword [ebp - 0x194], eax
jmp 0x421c0c
mov ecx, dword [ebp - 0x194]
sub ecx, 1
mov dword [ebp - 0x194], ecx
mov edx, dword [ebp - 0x194]
cmp edx, dword [ebp - 4]
jb 0x421c34
mov eax, dword [ebp - 0x194]
movsx ecx, byte [eax]
cmp ecx, 0x20
jg 0x421c34
mov edx, dword [ebp - 0x194]
movsx eax, byte [edx]
test eax, eax
jl 0x421c34
jmp 0x421bfd
mov ecx, dword [ebp - 0x194]
add ecx, 1
mov dword [ebp - 0x194], ecx
mov edx, dword [ebp - 0x194]
movsx eax, byte [edx]
test eax, eax
je 0x421c65
mov ecx, dword [ebp - 0x194]
mov dword [ebp - 0x198], ecx
mov edx, dword [ebp - 0x198]
mov byte [edx], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004364d4
mov esp, ebp
pop ebp
ret
Function at 0x421c80
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x467cb8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push eax
push str._sPATH
lea ecx, [ebp - 0x58]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x58]
push edx
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
test eax, eax
je 0x421cd1
lea eax, [ebp - 0x58]
push eax
push str.from_environment__s
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
xor eax, eax
jmp 0x421ce7
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [0x469514]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041f3b0
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004364d4
mov esp, ebp
pop ebp
ret

Function at 0x424390
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push str.WNC_BUFFER_TOO_SMALL_OPTION
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4243d2
push str.crash
mov eax, dword [ebp - 4]
push eax
call sub.MSVCR100.dll_strcmp
add esp, 8
test eax, eax
jne 0x4243d2
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 8]
mov dword [ecx], 1
mov esp, ebp
pop ebp
ret
Function at 0x425a20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
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 0x425a3b
xor eax, eax
jmp 0x425a47
mov eax, dword [ebp - 4]
and eax, 0x10
neg eax
sbb eax, eax
neg eax
mov esp, ebp
pop ebp
ret

Function at 0x425b30
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll__mkdir]
add esp, 4
test eax, eax
je 0x425b54
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 0xd
je 0x425b54
or eax, 0xffffffff
jmp 0x425b56
xor eax, eax
pop ebp
ret