joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43d850
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46a3f3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0045deb0
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.00463548
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.00464a64
test eax, eax
je 0x43d96c
mov ecx, dword [esp + 0x3c]
call fcn.00463575
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x43d930
push edi
mov ecx, esi
call fcn.00460bdd
mov ecx, esi
call fcn.0043dad0
cmp dword [esp + 0x38], 1
jne 0x43d965
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.00460d18
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x440390
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4403c3
push esi
call fcn.00443490
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4403bc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x440449
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x440432
mov eax, dword [esi + 8]
test eax, eax
je 0x4403e7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x44042e
cmp eax, 2
je 0x440432
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4403da
cmp eax, 3
je 0x44040d
cmp eax, 1
jne 0x4403da
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4403da
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4403da
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00440470
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x440458
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00440470
add esp, 4
pop esi
ret

Function at 0x45eca5
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x45ecdd
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.0045cd5c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0045cd34
jmp 0x45ece9
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x46039a
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 0x4603dc
call fcn.00465e4f
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4603dc
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4603d3
xor eax, eax
jmp 0x4603e4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004603ea
pop edi
pop esi
pop ebx
ret 4

Function at 0x46637f
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 0x4663ad
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4663cb
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004662e5
jmp 0x4663cb
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4663cb
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004662e5
test edi, edi
mov eax, edi
jne 0x4663b5
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4015c4
Capabilities:
Print debug messages

Disassembly:
push dword [0x40f030]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x40f030]
mov ecx, 0x812a78
sub ecx, eax
cmp ecx, 0x400
jae 0x4015f8
push ecx
push 0x2a
push eax
call fcn.00405110
add esp, 0xc
and byte [0x812a77], 0
ret
push eax
call fcn.00405090
add dword [0x40f030], eax
pop ecx
ret

Function at 0x401723
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x40c6c8
call fcn.00405820
sub esp, 0x1c
cmp byte [ecx + 1], 0x3a
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
jne 0x401823
mov al, byte [ecx]
push 1
and eax, 0x1f
pop ebx
cmp eax, ebx
mov dword [ebp - 0x20], eax
jb 0x401823
cmp eax, 0x1a
ja 0x401823
mov edi, eax
shl edi, 3
cmp dword [edi + 0x4129a0], 0
lea esi, [edi + 0x4129a0]
jne 0x4017cf
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
push 0x4016da
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4017c6
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 8
push eax
push esi
push 0
push 0
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4017bb
mov dword [esi], ebx
and dword [edi + 0x4129a4], 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4017cf
mov dword [esi], ebx
and dword [edi + 0x4129a4], 0
mov eax, dword [esi]
cmp eax, dword [edi + 0x4129a4]
ja 0x401823
mov ecx, dword [ebp - 0x20]
and dword [ebp - 4], 0
call fcn.00401635
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x20], eax
push ebx
push eax
call fcn.00401860
lea eax, [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
push 0
push eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], bl
push eax
mov dword [ebp - 0x14], ebx
push dword [ebp - 0x18]
call fcn.0040442a
cmp eax, 0xffffffff
je 0x401845
cmp dword [ebp - 0x14], ebx
je 0x401834
and byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.004018ac
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
mov eax, dword [ebp - 0x1c]
cmp eax, dword [esi]
jb 0x401843
cmp eax, dword [edi + 0x4129a4]
jbe 0x401845
xor ebx, ebx
and byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.004018ac
mov eax, ebx
jmp 0x401825

Function at 0x4018d5
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
push esi
push 0x4018d2
push ecx
call fcn.00405a80
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x40193c
push esi
push 1
lea eax, [ebp - 0x200]
push 0x200
push eax
call fcn.00405910
add esp, 0x10
cmp eax, 1
push esi
je 0x401917
call fcn.00405890
pop ecx
jmp 0x40193c
call fcn.00405890
cmp byte [ebp - 0x200], 0x4d
pop ecx
jne 0x401956
cmp byte [ebp - 0x1ff], 0x5a
jne 0x401956
mov eax, dword [ebp - 0x1c4]
cmp eax, 0x1f0
jbe 0x401940
xor eax, eax
jmp 0x401959
cmp dword [ebp + eax - 0x200], 0x4550
jne 0x401956
mov eax, dword [ebp + eax - 0x1f8]
jmp 0x401959
or eax, 0xffffffff
pop esi
leave
ret
Function at 0x401b75
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
xor ebx, ebx
cmp byte [0x812ba4], bl
push esi
push edi
mov esi, ecx
je 0x401ba6
push esi
push 0x4019be
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
cmp byte [esi + 0x104], bl
lea eax, [esi + 0x210]
mov dword [ebp - 0xc], eax
mov edi, 0x104
mov byte [eax], bl
lea eax, [esi + 0x104]
je 0x401c8f
cmp byte [esi + 0x105], 0x3a
jne 0x401c0e
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00405ad0
cmp byte [0x812ba4], bl
pop ecx
pop ecx
je 0x401cad
push 0x4019d2
push 0x4019fa
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
jmp 0x401cad
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], edi
push ecx
lea ecx, [ebp - 0x118]
push ecx
push eax
call sub.Msi.dll_MsiOpenPackageA
cmp eax, 3
je 0x401c43
cmp eax, 5
je 0x401c43
cmp byte [0x812ba4], bl
je 0x401e11
push eax
push 0x4019fe
jmp 0x401dfe
cmp byte [ebp - 0x117], 0x3a
jne 0x401e11
cmp byte [0x812ba4], bl
je 0x401c77
lea eax, [ebp - 0x118]
push eax
push 0x401a46
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp - 0x118]
push 0x5c
push eax
call fcn.00405aa0
pop ecx
cmp eax, ebx
pop ecx
je 0x401cad
mov byte [eax], bl
jmp 0x401cad
lea eax, [ebp - 0x118]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, ebx
jle 0x401dec
cmp eax, edi
jge 0x401dec
push esi
call fcn.00405090
mov ebx, eax
lea eax, [ebp - 0x118]
push eax
call fcn.00405090
lea eax, [ebx + eax + 2]
pop ecx
cmp eax, edi
pop ecx
ja 0x401e11
lea eax, [ebp - 0x118]
push esi
push eax
lea eax, [ebp - 0x21c]
push 0x401a7e
push eax
call fcn.00405310
mov eax, dword [esi + 0x20c]
add esp, 0x10
xor ebx, ebx
lea ecx, [ebp - 0x10]
neg eax
sbb eax, eax
lea edx, [ebp - 4]
and eax, ecx
lea ecx, [ebp - 0x21c]
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x10], ebx
call fcn.0040195c
test eax, eax
jne 0x401d31
cmp byte [0x812ba4], bl
je 0x401e11
push 0x401a86
push 0x401a9e
jmp 0x401dfe
cmp byte [0x812ba4], bl
je 0x401d58
lea eax, [ebp - 0x118]
push eax
push 0x401aa2
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
mov eax, dword [ebp - 8]
and eax, 6
cmp al, 6
jne 0x401d7d
cmp byte [0x812ba4], bl
je 0x401e11
push 0x401ab2
push 0x401af6
jmp 0x401dfe
mov eax, dword [esi + 0x208]
cmp eax, ebx
je 0x401dad
cmp eax, dword [ebp - 4]
je 0x401dad
cmp byte [0x812ba4], bl
je 0x401e11
push eax
push dword [ebp - 4]
push 0x401afa
push dword [0x40f030]
call fcn.00405310
add esp, 0x10
jmp 0x401e0c
lea ecx, [ebp - 0x21c]
call fcn.00401723
test eax, eax
je 0x401dd0
cmp byte [0x812ba4], bl
je 0x401e11
push 0x401b3e
push 0x401b72
jmp 0x401dfe
mov eax, dword [ebp - 4]
mov dword [esi + 0x208], eax
lea eax, [ebp - 0x118]
push eax
push dword [ebp - 0xc]
call fcn.00405ad0
pop ecx
pop ecx
jmp 0x401e11
cmp byte [0x812ba4], bl
je 0x401e11
push 0x401a5a
push 0x401a7a
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401ea1
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0xf003f
push 0
push 0x401e68
push 0
push 0x401e6c
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401ef6
push pe_nt_image_headers32
push 0x812ae4
push 3
push eax
push 0x401e98
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret

Function at 0x4028eb
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
cmp byte [0x812ba4], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, ecx
je 0x40291e
push ebx
push 0x402866
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
mov eax, dword [esi + 4]
test eax, eax
je 0x402978
lea ecx, [ebp + 0xc]
push 0
push ecx
push ebx
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402a1e
cmp byte [0x812ba4], al
je 0x402963
push 0x402892
push 0x4028b2
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp + 8]
push 0x40d780
push eax
mov dword [ebp + 8], 9
call fcn.00405840
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi]
shl edx, cl
mov eax, dword [eax + 0x208]
sub eax, edx
cmp ebx, eax
jbe 0x402990
mov ebx, eax
and dword [ebp + 0xc], 0
test ebx, ebx
jbe 0x402a1e
lea edi, [esi + 0x14]
mov eax, dword [esi + 0x10]
cmp eax, dword [edi]
jb 0x4029e2
mov eax, dword [esi]
push eax
add eax, 0x210
push eax
lea eax, [ebp - 0x100]
push 0x4028b6
push eax
call fcn.00405310
add esp, 0x10
mov ecx, dword [esi + 8]
push dword [esi + 0x18]
lea eax, [ebp - 0x100]
push dword [esi + 0xc]
push edi
push eax
call fcn.0040442a
cmp dword [edi], 0
je 0x402a16
and dword [esi + 0x10], 0
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
push dword [ebp + 8]
lea eax, [ecx + eax*4]
mov ecx, dword [esi + 8]
push eax
push 1
call fcn.004045aa
test eax, eax
jne 0x402a4c
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x10]
push 1
inc dword [esi + 0x18]
pop eax
shl eax, cl
add dword [ebp + 8], eax
add dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], ebx
jb 0x40299f
cmp dword [ebp + 0xc], ebx
jbe 0x402a1e
mov dword [ebp + 0xc], ebx
cmp byte [0x812ba4], 0
je 0x402a42
push dword [ebp + 0xc]
push 0x4028e2
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 8
cmp byte [0x812ba4], 0
je 0x402a72
push 0x4028be
push 0x4028de
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp + 8]
push 0x40d780
push eax
mov dword [ebp + 8], 9
call fcn.00405840
int3
Function at 0x402ab7
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov edi, str._:TEMP.TUW
and dword [esi], 0
mov dword [esi + 4], eax
mov al, byte [eax]
push 0
add al, 0x40
push edi
mov byte [str._:TEMP.TUW], al
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esi + 4]
lea ebx, [esi + 8]
push edi
push ebx
mov al, byte [eax]
add al, 0x40
mov byte [str._:TEMP.TUW], al
call fcn.00405ad0
push 0x402a88
push ebx
call fcn.00405ae0
push ebx
call fcn.00405090
mov ebx, str.AAAAAAAA.TUW
lea eax, [eax + esi + 8]
push ebx
push eax
mov dword [esi + 0x10c], eax
call fcn.00405ad0
add esp, 0x1c
cmp byte [str.AAAAAAAA.TUW], 0x5a
jne 0x402b31
mov byte [ebx], 0x41
inc ebx
cmp byte [ebx], 0x5a
je 0x402b28
inc byte [ebx]
xor ebx, ebx
push ebx
push ebx
push 2
push ebx
push ebx
lea eax, [esi + 8]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
mov dword [esi], eax
je 0x402b7b
cmp eax, 0xffffffff
je 0x402b7b
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi], 0xffffffff
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 4
mov eax, dword [esi + 4]
push edi
mov al, byte [eax]
add al, 0x40
mov byte [str._:TEMP.TUW], al
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp byte [0x812ba4], 0
je 0x402bb4
push 0x402a8c
push 0x402ab4
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp + 8]
push 0x40d780
push eax
mov dword [ebp + 8], 7
call fcn.00405840
int3

Function at 0x402eb8
Capabilities:
Delete directory
Delete file

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi]
test eax, eax
je 0x402ecd
cmp eax, 0xffffffff
je 0x402ecd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi + 4]
push str._:TEMP.TUW
mov al, byte [eax]
add al, 0x40
mov byte [str._:TEMP.TUW], al
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop esi
ret
Function at 0x403306
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi], 0xffffffff
jne 0x40336f
push ebx
push ebx
push 3
push ebx
push ebx
lea eax, [esi + 8]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
mov dword [esi], eax
je 0x403335
cmp eax, 0xffffffff
jne 0x40336f
cmp byte [0x812ba4], bl
je 0x40335a
push str.Failed_to_open_the_output_file._n
push 0x40d1f8
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp + 0xc]
push 0x40d780
push eax
mov dword [ebp + 0xc], 8
call fcn.00405840
cmp byte [0x812ba4], bl
push edi
mov edi, dword [ebp + 0xc]
je 0x403394
push edi
push str.Writing__d_bytes_to_temp_file_n
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp - 4]
push ebx
push eax
push edi
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 4], edi
pop edi
je 0x4033e5
cmp byte [0x812ba4], bl
je 0x4033d0
push str.Failed_to_write_to_the_output_file._n
push 0x40d1f8
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
lea eax, [ebp + 0xc]
push 0x40d780
push eax
mov dword [ebp + 0xc], 0xa
call fcn.00405840
pop esi
pop ebx
leave
ret 8

Function at 0x403e54
Capabilities:
Check os version
Get disk information

Disassembly:
mov eax, 0x40c758
call fcn.00405820
sub esp, 0x1b8
push ebx
push esi
push edi
lea eax, [ebp - 0xc0]
mov dword [ebp - 0x10], esp
push eax
mov dword [ebp - 0xc0], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xb0], 1
je 0x403e91
push 5
jmp 0x403f8f
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x104
push eax
lea eax, [ebp - 0x1c4]
push eax
push 0x403de0
call sub.Msi.dll_MsiOpenPackageA
cmp eax, 3
je 0x403edb
cmp eax, 5
je 0x403edb
cmp byte [0x812ba4], 0
je 0x403ee4
push eax
push 0x403e08
push dword [0x40f030]
call fcn.00405310
add esp, 0xc
call fcn.004015c4
jmp 0x403ee4
cmp byte [ebp - 0x1c4], 0x5c
jne 0x403eeb
push 6
jmp 0x403f8f
lea eax, [ebp - 0x1c4]
push 3
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00405ff0
add esp, 0xc
lea eax, [ebp - 0x2c]
xor ebx, ebx
push 0x10
push eax
lea eax, [ebp - 0x18]
mov byte [ebp - 0x11], bl
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test byte [ebp - 0x17], 0x80
je 0x403f27
push 9
jmp 0x403f8f
push 3
lea eax, [ebp - 0x2c]
push 0x403e50
push eax
call fcn.00405fb0
add esp, 0xc
test eax, eax
jne 0x403f8d
lea ecx, [ebp - 0x1c4]
call fcn.00401723
test eax, eax
je 0x403f51
push 8
jmp 0x403f8f
mov cl, byte [ebp - 0x1c4]
mov dword [ebp - 4], ebx
and ecx, 0x1f
call fcn.00401635
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
push 1
push eax
call fcn.00401860
lea ecx, [ebp - 0x1c]
call fcn.004018ac
xor eax, eax
jmp 0x403f90
push 7
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x406200
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d2d8
push 0x40a718
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x812c1c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x812c18], ecx
shl ecx, 8
add ecx, edx
mov dword [0x812c14], ecx
shr eax, 0x10
mov dword [0x812c10], eax
call fcn.00408680
test eax, eax
jne 0x40626a
push 0x1c
call fcn.004063a0
add esp, 4
mov dword [ebp - 4], 0
call fcn.004083b0
call fcn.0040a700
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x814004], eax
call fcn.0040a2c0
mov dword [0x812ba8], eax
test eax, eax
je 0x40629d
mov eax, dword [0x814004]
test eax, eax
jne 0x4062a7
push 0xffffffffffffffff
call fcn.004098b0
add esp, 4
call fcn.00409e10
call fcn.00409d20
call fcn.00409880
mov esi, dword [0x814004]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x406386
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x4062ee
test al, al
je 0x4062ee
and eax, 0xff
push eax
call fcn.00409c70
add esp, 4
test eax, eax
je 0x4062c8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4062c8
cmp byte [esi], 0x22
jne 0x4062f7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x406307
cmp al, 0x20
ja 0x406307
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4062f7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x406328
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40632d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.004098b0
jmp 0x40636b
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x4062f7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406386
Function at 0x409910
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x812c4c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40992f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x812c48], 1
mov byte [0x812c44], bl
jne 0x409989
mov ecx, dword [0x813ee8]
test ecx, ecx
je 0x409977
mov esi, dword [0x813ee4]
sub esi, 4
cmp esi, ecx
jb 0x409977
mov eax, dword [esi]
test eax, eax
je 0x409970
call eax
mov ecx, dword [0x813ee8]
sub esi, 4
cmp esi, ecx
jae 0x409962
push 0x40f020
push 0x40f018
call fcn.004099c0
add esp, 8
push 0x40f02c
push 0x40f024
call fcn.004099c0
add esp, 8
test ebx, ebx
jne 0x4099b0
push ebp
mov dword [0x812c4c], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x40a2c0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x812d60]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x40a302
call edi
mov esi, eax
test esi, esi
je 0x40a2ec
mov eax, 1
jmp 0x40a2fd
call ebp
mov ebx, eax
test ebx, ebx
je 0x40a40f
mov eax, 2
mov dword [0x812d60], eax
cmp eax, 1
jne 0x40a3a2
test esi, esi
jne 0x40a31b
call edi
mov esi, eax
test esi, esi
je 0x40a40f
cmp word [esi], 0
mov eax, esi
je 0x40a335
add eax, 2
cmp word [eax], 0
jne 0x40a323
add eax, 2
cmp word [eax], 0
jne 0x40a323
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x40a394
push edi
call fcn.00406fc0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40a394
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40a386
push ebx
call fcn.00405ee0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40a40f
test ebx, ebx
jne 0x40a3b3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40a40f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40a3cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a3bb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a3bb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00406fc0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40a3ed
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret