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

Disassembly:
or ch, dh
or byte [eax], ah
or byte [eax], cl
cmc
aas
or byte [eax], cl
or byte [esi + 8], dh
or byte [0x8a50808], al
inc ecx
or byte [0x90904890], ah
nop
nop
nop
push ebp
mov ebp, esp
and eax, 0x58
or byte [ebp - 0x74a857bb], 0x7d
add byte [ebp - 0x74af03b3], 0x45
pushal
mov eax, 0x8b510c55
dec ebp
or byte [edx + 0x57], dl
mov ecx, dword [ebp + 8]
push edx
push edi
push eax
push ecx
call 0xe9acc0
mov ecx, dword [ebp - 4]
mov dh, 0x55
push ebp
and ebx, 0x18
outsd dx, dword [esi]
inc ebp
clc
test ecx, ecx
mov esi, edx
je 0x407d5d
mov byte [edx], 0x2d
lea esi, [edx + 1]
ror byte [edi - 1], 0x53
test dword [ebp + 0x7e], ecx
sbb byte [eax + 0x7c3001fd], al
push es
dec edi
jle 0x407d7d
cmp ch, 1
xor byte [esi + eax + 0x4f], bh
dec ecx
test ecx, ecx
jg 0x407d65
xchg esi, eax
jge 0x407d84
mov ebx, dword [ebp + 0xc]
test esp, eax
jl 0x407e2a
add byte [eax], al
mov ecx, ebx
mov ebp, 0x4f983cf
vmread dword [eax - 0x7b000000], esi
ja 0x407e0e
stc
add al, 0xf
js 0x407d39
add byte [eax], al
add byte [ebp - 0x7fc48089], al
cmp byte [eax], dh
je 0x407d63
cmp eax, dword [eax - 0x318bcfc8]
invalid
adc al, 0x46
mov al, byte [esi - 1]
pop ebx
cmp al, 0x2e
jne 0x407eb3
mov ebx, dword [eax + ebx]
test eax, eax
mov eax, edx
invalid
inc esi
inc dword [edx + 0x5f]
pop esi
mov esp, ebp
pop ebp
ret
mov eax, edx
mov byte [esi], 0xc
pop edi
dec esi
mov esp, ebp
pop ebp
ret
Function at 0x1001e00
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001220
push 0x1002538
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 [0x10088e0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x10088dc], ecx
shl ecx, 8
add ecx, edx
mov dword [0x10088d8], ecx
shr eax, 0x10
mov dword [0x10088d4], eax
call fcn.01003180
test eax, eax
jne 0x1001e6a
push 0x1c
call fcn.01001fd0
add esp, 4
mov dword [ebp - 4], 0
call fcn.01002f80
call fcn.01002f70
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1009cf0], eax
call fcn.01002b40
mov dword [0x10088bc], eax
test eax, eax
je 0x1001e9d
mov eax, dword [0x1009cf0]
test eax, eax
jne 0x1001ea7
push 0xffffffffffffffff
call fcn.01002330
add esp, 4
call fcn.01002890
call fcn.010027a0
call fcn.01002300
mov esi, dword [0x1009cf0]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x1001f86
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x1001eee
test al, al
je 0x1001eee
and eax, 0xff
push eax
call fcn.01002000
add esp, 4
test eax, eax
je 0x1001ec8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x1001ec8
cmp byte [esi], 0x22
jne 0x1001ef7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x1001f07
cmp al, 0x20
ja 0x1001f07
inc esi
mov dword [ebp - 0x64], esi
jmp 0x1001ef7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x1001f28
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x1001f2d
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.01002330
jmp 0x1001f6b
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 0x1001ef7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x1001f86

Function at 0x1001fd0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x10088c4], 1
jne 0x1001fde
call fcn.010031c0
mov eax, dword [esp + 4]
push eax
call fcn.01003200
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x1002370
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x1008910]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x100238f
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 [0x100890c], 1
mov byte [0x1008908], bl
jne 0x10023e9
mov ecx, dword [0x1009ce8]
test ecx, ecx
je 0x10023d7
mov esi, dword [0x1009ce4]
sub esi, 4
cmp esi, ecx
jb 0x10023d7
mov eax, dword [esi]
test eax, eax
je 0x10023d0
call eax
mov ecx, dword [0x1009ce8]
sub esi, 4
cmp esi, ecx
jae 0x10023c2
push 0x100601c
push 0x1006014
call fcn.01002420
add esp, 8
push 0x1006024
push 0x1006020
call fcn.01002420
add esp, 8
test ebx, ebx
jne 0x1002410
push ebp
mov dword [0x1008910], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x1002b40
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x1008a20]
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 0x1002b82
call edi
mov esi, eax
test esi, esi
je 0x1002b6c
mov eax, 1
jmp 0x1002b7d
call ebp
mov ebx, eax
test ebx, ebx
je 0x1002c8f
mov eax, 2
mov dword [0x1008a20], eax
cmp eax, 1
jne 0x1002c22
test esi, esi
jne 0x1002b9b
call edi
mov esi, eax
test esi, esi
je 0x1002c8f
cmp word [esi], 0
mov eax, esi
je 0x1002bb5
add eax, 2
cmp word [eax], 0
jne 0x1002ba3
add eax, 2
cmp word [eax], 0
jne 0x1002ba3
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 0x1002c14
push edi
call fcn.01003a50
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1002c14
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 0x1002c06
push ebx
call fcn.01003a00
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 0x1002c8f
test ebx, ebx
jne 0x1002c33
call ebp
mov ebx, eax
test ebx, ebx
je 0x1002c8f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x1002c4b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1002c3b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1002c3b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.01003a50
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1002c6d
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
Function at 0x1003200
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x10061e0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x1003224
add eax, 8
inc ebp
cmp eax, 0x1006270
jb 0x1003215
cmp ecx, dword [ebp*8 + 0x10061e0]
jne 0x10033cb
mov eax, dword [0x10088c4]
cmp eax, 1
je 0x100338d
test eax, eax
jne 0x1003250
cmp dword [0x1006034], 1
je 0x100338d
cmp ecx, 0xfc
je 0x10033cb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x100328b
mov ecx, 5
mov esi, 0x1001504
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x10032d4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x1001500
add ebx, ecx
push ebx
call fcn.010042b0
add esp, 0xc
mov ecx, 6
mov esi, 0x10014e4
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10014e0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x10014b8
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x10061e4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.01004220
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x1009be0]
test eax, eax
je 0x100339e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x10033a8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x10061e4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor 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 edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x10045f0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x1009ce0]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x100479d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x1009be0]
lea edi, [ecx*4 + 0x1009be0]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x100479d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x100465e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x100466f
push 2
push ebp
push eax
call fcn.01004530
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x10047ce
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x1004719
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x10046ca
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x10046b7
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x100469a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047bf
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x1004715
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x1004696
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x100478e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1004762
cmp eax, 5
jne 0x100474b
mov dword [0x10088cc], eax
mov dword [0x10088c8], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.01004cf0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x1004782
cmp byte [ebp], 0x1a
jne 0x1004782
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x10088c8], 0x1c
jmp 0x10047a7
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x10088c8], 9
pop edi
pop esi
pop ebp
mov dword [0x10088cc], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x1004715
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047ff
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x1004719
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x1004719
Function at 0x401750
Capabilities:
Create thread

Disassembly:
push ecx
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, ecx
test edi, edi
je 0x401765
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
mov eax, dword [esi + 8]
test eax, eax
je 0x401774
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 8], edi
lea edi, [esi + 0xc]
push ecx
mov ecx, edi
call fcn.00401320
push 0x5c
mov ecx, edi
call fcn.00401490
lea edx, [esp + 8]
push edx
push 0
push esi
push 0x401260
push 0
push 0
mov dword [0x4b8700], esi
mov dword [0x4b8708], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x4b8844], 2
pop edi
mov dword [0x4b8704], eax
pop esi
je 0x4017cb
call fcn.00449240
mov eax, dword [0x4b8704]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x4b8708]
mov dword [0x4b88d0], 0
test eax, eax
je 0x401857
lea ecx, [eax - 1]
cmp ecx, 0x69
ja case.0x4017fb.4
movzx ecx, byte [ecx + 0x4018f0]
jmp dword [ecx*4 + 0x4018dc]
push 0x11
push 0
call fcn.0044a5f0
add esp, 8
mov eax, 0x80004005
pop ecx
ret 8
push 0x12
push 0
call fcn.0044a5f0
add esp, 8
mov eax, 0x80004005
pop ecx
ret 8
push 0x13
push 0
call fcn.0044a5f0
add esp, 8
mov eax, 0x80004005
pop ecx
ret 8
push eax
push 0x14
push 0
call fcn.0044a5f0
add esp, 0xc
mov eax, 0x80004005
pop ecx
ret 8
cmp dword [0x4b88d8], 0
jne case.0x4017fb.104
mov eax, dword [0x4b8704]
lea edx, [esp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov eax, dword [esp + 8]
je 0x401881
test eax, eax
jne 0x401881
pop ecx
ret 8
mov ecx, eax
and ecx, 0x80070000
cmp ecx, 0x80070000
je 0x4018a7
push eax
push 0x21
push 0
call fcn.0044a5f0
add esp, 0xc
mov eax, 0x80004005
pop ecx
ret 8
and eax, 0xffff
cmp eax, 0xe
jne 0x4018ba
cmp dword [0x4b8848], 0xffffffff
je case.0x4017fb.104
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 8]
push edx
push 0x22
push 1
call fcn.0044a5f0
add esp, 0xc
mov eax, 0x80004005
pop ecx
ret 8
Function at 0x4024d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [esp + 0x58]
mov ebp, dword [esp + 0x54]
mov edi, eax
movzx eax, word [0x4b870c]
push eax
push ebx
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov esi, eax
test esi, esi
jne 0x402514
push 0x409
push ebx
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov esi, eax
test esi, esi
je 0x402541
mov ebx, dword [esp + 0x5c]
test ebx, ebx
je 0x402526
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebx], eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x402541
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
cmp dword [0x4b871c], 0
jne 0x4025b9
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
push str.kernel32
mov dword [0x4b871c], 1
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
movzx ecx, word [0x4b870c]
push 0
push 0x409
push 0
push ecx
lea edx, [esp + 0x20]
push str._04X_c_04X_c
push edx
mov esi, eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
test esi, esi
jne 0x4025ae
push str.SetThreadPreferredUILanguages
push str.kernel32
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x4025b9
push 0
lea eax, [esp + 0x14]
push eax
push 4
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
Function at 0x402920
Capabilities:
Get geographical location
Query environment variable

Disassembly:
sub esp, 0xa0
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0xac]
cmp dword [0x4b2a98], esi
je 0x402959
mov eax, 0x4b2a98
mov edi, edi
cmp dword [eax], edi
je 0x402959
inc esi
mov eax, esi
shl eax, 4
cmp dword [eax + 0x4b2a98], 0
lea eax, [eax + 0x4b2a98]
jne 0x402940
shl esi, 4
cmp dword [esi + 0x4b2a98], 0
jne 0x402973
pop edi
mov eax, 0x4935f8
pop esi
add esp, 0xa0
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
push edi
lea ecx, [esp + 0x14]
push str.7zSfxString_d
push ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0
push 0
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
call ebp
test eax, eax
jne 0x402a20
xor ecx, ecx
lea eax, [edi + 2]
mov edx, 2
mul edx
seto cl
push ebx
neg ecx
or ecx, eax
push ecx
call fcn.0045a25a
add esp, 4
mov ebx, eax
lea eax, [edi + 1]
push eax
push ebx
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, edi
ja 0x402a16
call ebp
test eax, eax
jne 0x402a16
mov eax, dword [esi + 0x4b2aa4]
test eax, eax
je 0x402a0e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402a16
mov edx, dword [esi + 0x4b2aa4]
push edx
call fcn.0046d9dc
mov dword [esi + 0x4b2aa4], ebx
jmp 0x402a1c
mov dword [esi + 0x4b2aa4], ebx
jmp 0x402a1f
push ebx
call fcn.0046d9dc
add esp, 4
pop ebx
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x4b2aa4]
test eax, eax
jne 0x402aeb
mov ebp, dword [esi + 0x4b2a9c]
cmp dword [esi + 0x4b2aa0], eax
je 0x402a5a
call fcn.004028c0
cmp eax, dword [0x495f74]
jne 0x402a5a
mov ebp, dword [esi + 0x4b2aa0]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
xor ecx, ecx
lea eax, [edi + 2]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0045a25a
add esp, 4
cmp dword [0x4b0110], 0xffffffff
mov dword [esi + 0x4b2aa4], eax
jne 0x402ac9
movzx ecx, word [0x4b870c]
push 0x1f
lea eax, [esp + 0x70]
push eax
push 0x1004
push ecx
mov dword [0x4b0110], 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x402ac9
lea edx, [esp + 0x6c]
push edx
call fcn.0046e1f5
add esp, 4
mov dword [0x4b0110], eax
mov ecx, dword [esi + 0x4b2aa4]
mov edx, dword [0x4b0110]
lea eax, [edi + 1]
push eax
push ecx
push edi
push ebp
push 0
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x4b2aa4]
pop ebp
pop edi
pop esi
add esp, 0xa0
ret
Function at 0x404650
Capabilities:
Get memory capacity

Disassembly:
sub esp, 0x40
push esi
mov esi, dword [esp + 0x48]
test esi, esi
je 0x4046af
test byte [0x4b8848], 2
mov dword [esp + 4], 0x40
jne 0x4046bd
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x4046bd
mov ecx, dword [esp + 0x18]
xor eax, eax
cmp ecx, eax
ja 0x4046bd
jb 0x404690
mov edx, dword [esp + 0x14]
cmp edx, esi
jae 0x4046bd
push 0x2b
call fcn.00402920
push eax
call fcn.00449190
add esp, 8
cmp eax, 1
je 0x4046b6
mov dword [0x4b8848], 0xffffffff
xor eax, eax
pop esi
add esp, 0x40
ret
or dword [0x4b8848], 2
mov eax, 1
pop esi
add esp, 0x40
ret

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

Disassembly:
mov eax, dword [esp + 4]
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [esp + 0xc]
mov dword [esi], 0
cmp eax, 0xffffffff
jne 0x404749
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
xor al, al
pop esi
ret
shr al, 4
and al, 1
pop esi
ret

Function at 0x406d90
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x48f388
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
xor edi, edi
push 3
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call fcn.004010b0
mov dword [esp + 0x24], edi
cmp dword [esp + 0x18], 1
jg 0x406ddb
push 1
lea ecx, [esp + 0x14]
call fcn.004010b0
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x10]
mov eax, dword [ebp]
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 1
push esi
push eax
call ebx
cmp eax, edi
je 0x406e3e
lea edi, [eax + 1]
cmp edi, dword [esp + 0x18]
jl 0x406e0d
push edi
lea ecx, [esp + 0x14]
call fcn.004010b0
mov esi, dword [esp + 0x10]
mov eax, dword [ebp]
push edi
push esi
push eax
call ebx
xor eax, eax
cmp word [esi], ax
je 0x406e28
lea esp, [esp]
inc eax
cmp word [esi + eax*2], 0
jne 0x406e20
xor ecx, ecx
lea edx, [esp + 0x10]
mov word [esi + eax*2], cx
push edx
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.00401370
mov dword [esp + 0x24], 0xffffffff
push esi
call fcn.0046d942
mov ecx, dword [esp + 0x20]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x406f10
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x48a210
push eax
mov dword fs:[0], esp
sub esp, 0x20
cmp dword [0x4b88e0], 3
jne 0x406f6e
push 0
lea eax, [esp + 8]
push eax
push 3
lea ecx, [esp + 0xc]
push ecx
push 0xfffffffffffffff5
mov byte [esp + 0x14], 0x7a
mov byte [esp + 0x15], 0xd
mov byte [esp + 0x16], 0xa
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor al, al
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
push ebx
push esi
push edi
xor ebx, ebx
push 3
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.00402d00
mov dword [esp + 0x34], ebx
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov eax, dword [edi]
cmp byte [eax + esi], bl
je 0x406fc2
lea ecx, [ecx]
cmp byte [eax + esi], 0xa
je 0x406fc2
cmp byte [eax + esi], 0xd
je 0x406fc2
movzx edx, byte [eax + esi]
push edx
lea ecx, [esp + 0x18]
call fcn.00404890
mov eax, dword [edi]
inc esi
cmp byte [eax + esi], bl
jne 0x406fa0
push 0xfde9
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00406c50
add esp, 0xc
mov byte [esp + 0x34], 1
cmp byte [esp + 0x44], bl
jne 0x406ffc
mov edx, dword [esp + 0x20]
mov eax, dword [0x4b0094]
push edx
push eax
push 0xb
push ebx
call fcn.0044a5f0
add esp, 0x10
jmp 0x40700c
mov ecx, dword [esp + 0x20]
push ecx
push 0x20
push ebx
call fcn.0044a5f0
add esp, 0xc
mov byte [esp + 0x34], bl
mov edx, dword [esp + 0x20]
push edx
call fcn.0046d942
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x18]
push eax
call fcn.0046d942
mov ecx, dword [esp + 0x34]
add esp, 8
pop edi
pop esi
pop ebx
xor al, al
mov dword fs:[0], ecx
add esp, 0x2c
ret

Function at 0x407140
Capabilities:
Get graphical window text

Disassembly:
push 0xffffffffffffffff
push 0x48a239
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], ebx
mov esi, dword [esp + 0x24]
push 3
mov ecx, esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
call fcn.004010b0
mov dword [esp + 0x1c], ebx
mov ebp, dword [esp + 0x28]
push ebp
mov dword [esp + 0x14], 1
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov edi, eax
cmp edi, ebx
jle 0x4071bc
lea ebx, [edi + 1]
cmp ebx, dword [esi + 8]
jl 0x4071a6
push ebx
mov ecx, esi
call fcn.004010b0
mov eax, dword [esi]
push ebx
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [esi]
xor ecx, ecx
mov word [eax + edi*2], cx
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x14]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret