joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402dfb
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x20
mov eax, dword [0x481600]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
xor ebp, ebp
push edi
mov eax, dword [esi + 0x3c]
mov ebx, dword [eax + esi + 0x78]
add ebx, esi
mov edi, dword [ebx + 0x20]
mov eax, dword [ebx + 0x18]
add edi, esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x402e64
mov eax, dword [edi]
lea ecx, [esp + 0x14]
add eax, esi
push eax
call fcn.004021d2
lea eax, [esp + 0x14]
push 0x235
push eax
call fcn.00404a64
pop ecx
pop ecx
cmp eax, dword [esp + 0x38]
je 0x402e7c
lea ecx, [esp + 0x14]
add edi, 4
call fcn.00403cdf
inc ebp
cmp ebp, dword [esp + 0x10]
jb 0x402e2c
xor edi, edi
mov ecx, dword [esp + 0x2c]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004067c8
add esp, 0x20
ret
mov eax, dword [ebx + 0x24]
lea eax, [eax + ebp*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebx + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x14]
call fcn.00403cdf
jmp 0x402e66

Function at 0x405401
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x18]
mov ebp, ecx
test esi, esi
jg 0x405421
jl 0x405418
test ebx, ebx
jne 0x405421
xor eax, eax
xor edx, edx
jmp 0x4054e4
cmp dword [ebp + 0x38], 0
je 0x405437
push esi
push ebx
push dword [esp + 0x18]
call fcn.004054ea
jmp 0x4054e4
mov eax, dword [ebp + 0x1c]
push edi
mov edi, ebx
mov ecx, dword [eax]
test ecx, ecx
je 0x40547b
mov eax, dword [ebp + 0x2c]
cmp dword [eax], 0
jbe 0x40547b
cmp dword [eax], ebx
mov esi, ebx
mov edi, dword [esp + 0x14]
cmovb esi, dword [eax]
push esi
push ecx
push edi
call fcn.00403f4c
mov eax, dword [ebp + 0x2c]
add edi, esi
mov dword [esp + 0x20], edi
add esp, 0xc
mov edi, ebx
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebp + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x1c]
jmp 0x405483
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
cmp dword [ebp + 0x4c], 0
je 0x4054da
mov ecx, ebp
call fcn.00403bb6
mov ecx, dword [esp + 0x14]
mov edx, edi
mov eax, 0xfff
cmp edi, eax
jbe 0x4054c5
push dword [ebp + 0x4c]
push eax
push 1
push ecx
call fcn.0040c0ec
mov ecx, dword [esp + 0x24]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [esp + 0x14], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x4054da
jmp 0x405496
test edx, edx
je 0x4054da
push dword [ebp + 0x4c]
push edi
push 1
push ecx
call fcn.0040c0ec
add esp, 0x10
sub edi, eax
sub ebx, edi
mov eax, ebx
sbb esi, 0
mov edx, esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x4057b4
Capabilities:
Access peb ldr_data
Delete file
Get kernel32 base address
Get number of processors

Disassembly:
sub esp, 0xd0
mov eax, dword [0x481600]
xor eax, esp
mov dword [esp + 0xcc], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x24
mov dword [esp + 0x14], ebx
call fcn.00406785
pop ecx
mov esi, eax
push 0x64
pop ebp
test esi, esi
je 0x40581a
push str.Window1
lea ecx, [esp + 0xc8]
call fcn.004021d2
lea eax, [esp + 0xc4]
push eax
push ebp
push ecx
push ecx
mov dword [esp + 4], 0x40000000
mov ecx, esi
mov dword [esp], 0x40400000
call fcn.0040222b
mov esi, eax
inc ebx
jmp 0x40581c
xor esi, esi
test bl, 1
je 0x40582d
lea ecx, [esp + 0xc4]
call fcn.00403cdf
test esi, esi
je 0x40584e
mov ecx, esi
call fcn.0040307d
test esi, esi
je 0x40584e
lea ecx, [esi + 0xc]
call fcn.00403cdf
push 0x24
push esi
call fcn.004067b5
pop ecx
pop ecx
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x482570], eax
push 0x27
push 0x481020
push 0x547
mov edi, 0x481048
push edi
call fcn.00402e9a
push 1
push 0x424458
call fcn.004059c0
push 0x8aafdc01
push dword [0x482570]
call fcn.00402dfb
add esp, 0x20
lea ecx, [esp + 0x14]
mov ebx, str.static.lib
mov esi, eax
push 1
push 0x40
push 2
push ebx
call fcn.0040201e
lea eax, [esp + 0x14]
push 0x424468
push eax
call fcn.004010ef
push eax
call fcn.00401dba
add esp, 0xc
sub ebp, 1
jne 0x4058b4
lea ecx, [esp + 0x14]
call fcn.00403f1c
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x10]
push eax
push 0x40
push 0x4e4
push edi
call esi
test eax, eax
je 0x405943
call fcn.00404efa
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x400
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x405943
push 0x42446c
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
pop ecx
pop ecx
xor ebx, ebx
push ebx
push ebx
push eax
push esi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
push esi
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x14]
call fcn.00402baa
mov ecx, dword [esp + 0xdc]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004067c8
add esp, 0xd0
ret 0x10

Function at 0x407516
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407555
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407555
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407555
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407555
cmp dword [ecx + 0x74], 0xe
jbe 0x407555
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x415527
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4282f8
push 0x4282f0
push str.FlsAlloc
push 0x1e
call fcn.004153f1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41555b
push dword [ebp + 8]
mov ecx, esi
call dword [0x424140]
call esi
jmp 0x415561
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x4155a5
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428308
push 0x428300
push str.FlsGetValue
push 0x20
call fcn.004153f1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4155dc
push dword [ebp + 8]
mov ecx, esi
call dword [0x424140]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x416c86
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00416af7

Function at 0x417080
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407680
mov eax, dword [0x481600]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00415b5a
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4170c2
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41721e
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00423450
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x483010]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00418078
mov ecx, dword [esi*4 + 0x483010]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x417217
cmp eax, dword [edi + ecx + 0x24]
jne 0x417217
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x417217
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00418078
add esp, 0x14
test edx, edx
jl 0x417217
jg 0x41718d
test eax, eax
jb 0x417217
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x417217
jl 0x4171a7
cmp dword [ebp - 0x1008], eax
ja 0x417217
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4171c5
test ebx, ebx
je 0x4171fe
cmp ecx, edi
jae 0x4171fe
mov al, byte [ecx]
cmp al, 0xd
jne 0x4171df
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4171eb
cmp byte [ecx + 1], 0xa
jne 0x4171eb
inc ecx
jmp 0x4171eb
movzx eax, al
movsx eax, byte [eax + 0x4818d0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4171c5
cmp edx, ebx
jne 0x4171c5
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x41721c
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004067c8
leave
ret
Function at 0x417515
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x483010]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417555
cmp byte [ebx], 0xa
jne 0x417555
or byte [eax + edi + 0x28], 4
jmp 0x41755a
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x417658
mov al, byte [edx]
cmp al, 0x1a
je 0x41763a
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x417589
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4175ae
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4175b8
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x41756b
jmp 0x417658
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x417635
cmp dword [ebp - 0xc], 0
je 0x417635
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x483010]
test byte [eax + edi + 0x28], 0x48
je 0x41760f
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4175fa
mov byte [esi], dl
jmp 0x41760b
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x483010]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x417658
cmp byte [ebp - 1], 0xa
jne 0x41761e
cmp esi, ebx
jne 0x41761e
mov byte [esi], 0xa
jmp 0x417657
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418096
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x417658
mov byte [esi], 0xd
jmp 0x417657
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x483010]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417654
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417658
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417661
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x483010]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4176a4
cmp word [esi], dx
jne 0x4176a4
or byte [edi + eax + 0x28], 4
jmp 0x4176a9
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4177fc
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4177dc
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4176eb
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x417721
cmp eax, edx
jae 0x41772d
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4176c3
jmp 0x4177fc
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4177d8
cmp dword [ebp - 0x14], 0
je 0x4177d8
mov eax, dword [ebx*4 + 0x483010]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4177b0
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x417779
mov word [esi], cx
jmp 0x4177ac
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x483010]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x483010]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x483010]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4177fc
pop ebx
cmp word [ebp - 4], bx
jne 0x4177c1
cmp esi, dword [ebp + 0xc]
jne 0x4177c1
mov word [esi], bx
jmp 0x4177f9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00418096
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4177fc
push 0xd
jmp 0x4177f5
mov ecx, dword [ebx*4 + 0x483010]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4177f3
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4177fc
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41bb24
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41bbc1
push ebx
push esi
call fcn.0041baed
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041a759
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41bb6e
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41bbc0
push edi
push eax
call fcn.00418275
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41bb8e
call fcn.00415116
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41bbbf
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041a759
add esp, 0x20
test eax, eax
jne 0x41bbad
push edi
call fcn.00415116
jmp 0x41bbb5
push ebx
call fcn.00415116
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x422135
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004220b1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4222ad
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4222ad
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x42225c
jg 0x42218e
test eax, eax
je 0x422252
push 1
push 0x1000
call fcn.004150b9
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4221b4
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x422249
push 0x8000
push ebx
call fcn.004116b0
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4221e0
jg 0x4221db
cmp ecx, 0x1000
jb 0x4221e0
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004168f7
add esp, 0x10
cmp eax, 0xffffffff
je 0x422225
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x4221db
jl 0x42220c
test ecx, ecx
jne 0x4221cd
push dword [ebp - 0xc]
push ebx
call fcn.004116b0
push esi
call fcn.00415116
add esp, 0xc
xor edi, edi
jmp 0x4222be
cmp byte [edi + 0x24], 0
je 0x42223c
cmp dword [edi + 0x20], 5
jne 0x42223c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x422247
mov edi, dword [edi + 0x18]
jmp 0x422249
xor edi, edi
push esi
call fcn.00415116
pop ecx
jmp 0x4222be
test ecx, ecx
jg 0x42221e
jl 0x42225c
test eax, eax
jae 0x42221e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00418096
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x42227f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x42221e
jmp 0x4222b6
push ebx
call fcn.0041bfbf
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x42221e
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x4222be
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4222bb
mov edi, dword [edi + 0x18]
jmp 0x4222be
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00418096
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x423330
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42335d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42335d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x406a00
Capabilities:
Resolve function by parsing pe exports

Disassembly:
out 0x40, eax
imul ebx, dword [eax - 0x6fb69a9e], 0xffffffeb
or byte [ebx + 0x23], cl
dec ecx
lds esp, [ecx]
shl dword [esi + ecx*4], cl
loopne 0x406992
Function at 0x402f05
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xc4
mov eax, 0x45d5ce
call fcn.0044133f
xor esi, esi
mov dword [ebp - 4], esi
push 0xf
pop edi
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x14], edi
call fcn.00401669
push esi
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x30], edi
call fcn.00401669
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.00402139
push dword [ebp + 8]
movzx eax, word [ebp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp dword [ebp - 0x14], 0x10
mov edi, eax
mov eax, dword [ebp - 0x28]
jae 0x402f7b
lea eax, [ebp - 0x28]
push 1
push 0x40
push 0x20
push eax
lea ecx, [ebp - 0xd0]
call fcn.00402d95
push edi
push ebx
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 5
call fcn.00402e5f
lea ecx, [ebp - 0xd0]
call fcn.00402b57
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 4
call fcn.00402c49
push esi
push 1
lea ecx, [ebp - 0x48]
call fcn.004018bc
push esi
push 1
lea ecx, [ebp - 0x2c]
call fcn.004018bc
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.0040127f
mov ecx, dword [ebp + 0x10]
add ecx, 0xfffffff0
call fcn.0040127f
mov ecx, dword [ebp + 0x14]
add ecx, 0xfffffff0
call fcn.0040127f
call fcn.004413c2
ret

Function at 0x403c9d
Capabilities:
Delete directory

Disassembly:
push 8
mov eax, 0x45d68d
call fcn.004412d6
and dword [ebp - 4], 0
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.004035d6
push str..
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00403c66
push ecx
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], esp
mov ecx, esp
push eax
call fcn.004035d6
call fcn.00403761
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0040127f
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.0040127f
call fcn.004413ae
ret
Function at 0x403ec7
Capabilities:
Get common file path

Disassembly:
push ebp
sub esp, 0x318
lea ebp, [esp - 4]
mov eax, dword [0x47e150]
xor eax, ebp
mov dword [ebp + 0x318], eax
push 0x10
mov eax, 0x45d6ec
call fcn.004412d6
mov eax, dword [ebp + 0x328]
and dword [ebp - 4], 0
mov edi, dword [ebp + 0x324]
and dword [ebp - 0x14], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x1c], edi
call fcn.00403e89
mov esi, 0x105
push esi
xor ebx, ebx
lea eax, [ebp + 0x108]
push 0
inc ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00440c20
add esp, 0x10
push esi
lea eax, [ebp + 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
lea eax, [ebp]
push 0
push eax
call fcn.00440c20
add esp, 0xc
push esi
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
lea eax, [ebp + 0x210]
push 0
push eax
call fcn.00440c20
add esp, 0xc
lea eax, [ebp + 0x210]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push dword [ebp - 0x18]
mov ecx, edi
call fcn.00403d16
push dword [ebp - 0x10]
mov ecx, edi
push str.APPPATH
mov dword [ebp - 0x14], ebx
call fcn.0040384e
lea eax, [ebp + 0x108]
push eax
push str.SYSTEMPATH
mov ecx, edi
call fcn.0040384e
lea eax, [ebp]
push eax
push str.WINDOWSPATH
mov ecx, edi
call fcn.0040384e
lea eax, [ebp + 0x210]
push eax
push str.TEMPPATH
mov ecx, edi
call fcn.0040384e
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0040127f
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x318]
xor ecx, ebp
call fcn.004412c7
add ebp, 0x31c
leave
ret

Function at 0x404895
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0xa4
mov eax, dword [0x47e150]
xor eax, ebp
mov dword [ebp + 0x64], eax
mov eax, dword [ebp + 0x7c]
mov ecx, dword [ebp + 0x70]
mov edx, dword [ebp + 0x74]
push edi
mov edi, dword [ebp + 0x78]
test eax, eax
jne 0x4048cd
lea eax, [ebp - 0x38]
push eax
push 1
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
jmp 0x4048e1
push ebx
lea ebx, [ebp - 0x38]
push ebx
or eax, 1
push eax
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
pop ebx
test eax, eax
je 0x4048e9
xor eax, eax
jmp 0x40491c
test edi, edi
je 0x40490e
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x34]
push eax
push 0
push 0
push edi
push dword [ebp - 0x38]
mov dword [ebp - 0x3c], 0x96
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4048e5
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
neg eax
sbb eax, eax
inc eax
mov ecx, dword [ebp + 0x64]
xor ecx, ebp
pop edi
call fcn.004412c7
add ebp, 0x68
leave
ret