joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d7180
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54dc6d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x589ed0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x58a04c]
cmp eax, 0xffffffff
jne 0x4d71b4
xor ebx, ebx
jmp 0x4d71bd
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], 0
test ebx, ebx
je 0x4d7296
mov eax, dword [ebx + 0x18]
test eax, eax
jne 0x4d71e0
cmp dword [ebx + 0xc], 0
je 0x4d7271
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x4d722c
mov eax, dword [esi + 4]
mov dword [ebx + 0xc], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x4d7212
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [esi]
mov ecx, edi
push 0
mov eax, dword [edi]
call dword [eax]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebx + 0xc]
test esi, esi
jne 0x4d71e7
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x4d71d6
mov eax, dword [ebx + 0x14]
mov esi, dword [eax]
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x4d724d
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4d724d
push eax
mov eax, dword [esi + 0x14]
push ecx
call eax
add esp, 8
push esi
lea ecx, [ebx + 0x14]
call fcn.004d4b40
push 0x20
push eax
call fcn.004b9f4f
mov eax, dword [ebx + 0x18]
add esp, 8
mov byte [ebp - 4], 0
test eax, eax
jne 0x4d7230
jmp 0x4d71d2
push 0x4d54f0
push 0x59531c
call fcn.004d5250
mov eax, dword [0x58a04c]
add esp, 8
cmp eax, 0xffffffff
je 0x4d7296
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], 2
test ebx, ebx
je 0x4d72c3
or eax, 0xffffffff
lock xadd dword [ebx + 4], eax
jne 0x4d72c3
mov eax, dword [ebx]
mov ecx, ebx
push 0
call dword [eax]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4d7570
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push esi
mov esi, ecx
mov edx, dword [esi]
lea eax, [edx + 0x10]
push eax
push 4
push edx
push 0x4d75d0
push 0
push 0
call fcn.0051ffdb
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4d7599
pop esi
xor al, al
pop ebx
ret
mov eax, dword [esi]
push edi
add eax, 4
lock inc dword [eax]
mov edi, dword [esi]
mov eax, dword [edi + 8]
test eax, eax
je 0x4d75b7
cmp eax, 0xffffffff
je 0x4d75b7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], ebx
mov eax, dword [esi]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop edi
pop esi
mov al, 1
pop ebx
ret
Function at 0x4d7740
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54dd4d
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push esi
mov eax, dword [0x589ed0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 8]
mov dword [esi + 4], eax
push 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0
mov dword [esi], vtable.std::codecvt_wchar_t__char__struct__Mbstatet_.0
call fcn.004bc1fc
mov dword [ebp - 0x6c], 0
mov byte [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov byte [ebp - 0x60], 0
xor eax, eax
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x58], ax
mov dword [ebp - 0x54], eax
mov word [ebp - 0x50], ax
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x48], al
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], al
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 7
push 0x55b5cc
push eax
call fcn.004bbeb1
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 8
push eax
call fcn.004bc5e8
movups xmm0, xmmword [eax]
movups xmmword [esi + 8], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [esi + 0x18], xmm0
movq xmm0, qword [eax + 0x20]
movq qword [esi + 0x28], xmm0
mov eax, dword [eax + 0x28]
mov dword [esi + 0x30], eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 9
push eax
call fcn.004bbefc
add esp, 0x10
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 0xa
test eax, eax
je 0x4d7820
push eax
call fcn.004e4691
add esp, 4
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 4], 0xb
test eax, eax
je 0x4d783b
push eax
call fcn.004e4691
add esp, 4
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x54]
mov byte [ebp - 4], 0xc
test eax, eax
je 0x4d7856
push eax
call fcn.004e4691
add esp, 4
mov dword [ebp - 0x54], 0
mov eax, dword [ebp - 0x5c]
mov byte [ebp - 4], 0xd
test eax, eax
je 0x4d7871
push eax
call fcn.004e4691
add esp, 4
mov dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x64]
mov byte [ebp - 4], 0xe
test eax, eax
je 0x4d788c
push eax
call fcn.004e4691
add esp, 4
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x6c]
mov byte [ebp - 4], 0xf
test eax, eax
je 0x4d78a7
push eax
call fcn.004e4691
add esp, 4
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x6c], 0
call fcn.004bc263
mov dword [esi], vtable.boost::archive::codecvt_null_wchar_t_.0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x5140b6
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 + 0x595ef0]
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 0x5140f6
cmp byte [ebx], 0xa
jne 0x5140f6
or byte [eax + edi + 0x28], 4
jmp 0x5140fb
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x5141f9
mov al, byte [edx]
cmp al, 0x1a
je 0x5141db
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x51412a
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x51414f
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x514159
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 0x51410c
jmp 0x5141f9
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 0x5141d6
cmp dword [ebp - 0xc], 0
je 0x5141d6
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x595ef0]
test byte [eax + edi + 0x28], 0x48
je 0x5141b0
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x51419b
mov byte [esi], dl
jmp 0x5141ac
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x595ef0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x5141f9
cmp byte [ebp - 1], 0xa
jne 0x5141bf
cmp esi, ebx
jne 0x5141bf
mov byte [esi], 0xa
jmp 0x5141f8
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00525f33
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x5141f9
mov byte [esi], 0xd
jmp 0x5141f8
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x595ef0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5141f5
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5141f9
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x514202
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 + 0x595ef0]
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 0x514245
cmp word [esi], dx
jne 0x514245
or byte [edi + eax + 0x28], 4
jmp 0x51424a
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 0x51439d
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 0x51437d
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x51428c
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5142c2
cmp eax, edx
jae 0x5142ce
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 0x514264
jmp 0x51439d
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 0x514379
cmp dword [ebp - 0x14], 0
je 0x514379
mov eax, dword [ebx*4 + 0x595ef0]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x514351
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x51431a
mov word [esi], cx
jmp 0x51434d
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x595ef0]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x595ef0]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x595ef0]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x51439d
pop ebx
cmp word [ebp - 4], bx
jne 0x514362
cmp esi, dword [ebp + 0xc]
jne 0x514362
mov word [esi], bx
jmp 0x51439a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00525f33
add esp, 0x10
cmp word [ebp - 4], bx
je 0x51439d
push 0xd
jmp 0x514396
mov ecx, dword [ebx*4 + 0x595ef0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x514394
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x51439d
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 0x524577
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5612dc
push 0x5612d4
push str.FlsAlloc
push 0x1e
call fcn.00524247
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5245ab
push dword [ebp + 8]
mov ecx, esi
call dword [0x54f5bc]
call esi
jmp 0x5245b1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x5245f5
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5612ec
push 0x5612e4
push str.FlsGetValue
push 0x20
call fcn.00524247
mov esi, eax
add esp, 0x10
test esi, esi
je 0x52462c
push dword [ebp + 8]
mov ecx, esi
call dword [0x54f5bc]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x5253b6
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00524f91

Function at 0x5253c1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00525120
Function at 0x5264a9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004ba8b0
mov eax, dword [0x589ed0]
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.00521df0
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x5264eb
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x526647
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004bac00
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 + 0x595ef0]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00525f15
mov ecx, dword [esi*4 + 0x595ef0]
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 0x526640
cmp eax, dword [edi + ecx + 0x24]
jne 0x526640
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 0x526640
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00525f15
add esp, 0x14
test edx, edx
jl 0x526640
jg 0x5265b6
test eax, eax
jb 0x526640
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x526640
jl 0x5265d0
cmp dword [ebp - 0x1008], eax
ja 0x526640
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x5265ee
test ebx, ebx
je 0x526627
cmp ecx, edi
jae 0x526627
mov al, byte [ecx]
cmp al, 0xd
jne 0x526608
lea eax, [edi - 1]
cmp ecx, eax
jae 0x526614
cmp byte [ecx + 1], 0xa
jne 0x526614
inc ecx
jmp 0x526614
movzx eax, al
movsx eax, byte [eax + 0x58a1a0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x5265ee
cmp edx, ebx
jne 0x5265ee
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x526645
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004ba2f5
leave
ret
Function at 0x529443
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x589ed0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x52948e
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.0052981d
test al, al
jne 0x529488
sub edx, 2
cmp edx, edi
jne 0x52946e
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x5294b0
lea eax, [edi + 2]
cmp edx, eax
je 0x5294b0
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0052910a
add esp, 0x10
jmp 0x5295aa
push esi
lea ecx, [ebp - 0x255]
call fcn.0052981d
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5294f3
push dword [ebp - 0x25c]
jmp 0x5294a0
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x529530
cmp word [ebp - 0x226], 0
je 0x529551
cmp word [ebp - 0x226], ax
jne 0x529530
cmp word [ebp - 0x224], 0
je 0x529551
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0052910a
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x52959d
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x52950a
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x529585
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x5295aa
push 0x528c29
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00536130
add esp, 0x10
jmp 0x52957a
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ba2f5
leave
ret
Function at 0x52aa9e
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 0x52ab3b
push ebx
push esi
call fcn.0052aa5a
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.00527ceb
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x52aae8
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x52ab3a
push edi
push eax
call fcn.00520c72
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x52ab08
call fcn.00520138
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x52ab39
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00527ceb
add esp, 0x20
test eax, eax
jne 0x52ab27
push edi
call fcn.00520138
jmp 0x52ab2f
push ebx
call fcn.00520138
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 0x52ab3e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x52ab4f
pop esi
ret
push ebx
push edi
push esi
call fcn.0052aa5a
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00520c72
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x52ab77
push ebx
push esi
push edi
call fcn.004d85f0
add esp, 0xc
push 0
call fcn.00520138
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x52b44d
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0052adea

Function at 0x52b783
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0052b657
Function at 0x5397ad
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.005395cd
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x539925
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x539925
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x5398d4
jg 0x539806
test eax, eax
je 0x5398ca
push 1
push 0x1000
call fcn.0052243e
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x53982c
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x5398c1
push 0x8000
push ebx
call fcn.00519a64
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 0x539858
jg 0x539853
cmp ecx, 0x1000
jb 0x539858
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.005153fc
add esp, 0x10
cmp eax, 0xffffffff
je 0x53989d
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 0x539853
jl 0x539884
test ecx, ecx
jne 0x539845
push dword [ebp - 0xc]
push ebx
call fcn.00519a64
push esi
call fcn.00520138
add esp, 0xc
xor edi, edi
jmp 0x539936
cmp byte [edi + 0x24], 0
je 0x5398b4
cmp dword [edi + 0x20], 5
jne 0x5398b4
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x5398bf
mov edi, dword [edi + 0x18]
jmp 0x5398c1
xor edi, edi
push esi
call fcn.00520138
pop ecx
jmp 0x539936
test ecx, ecx
jg 0x539896
jl 0x5398d4
test eax, eax
jae 0x539896
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00525f33
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5398f7
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x539896
jmp 0x53992e
push ebx
call fcn.005279cc
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x539896
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 0x539936
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x539933
mov edi, dword [edi + 0x18]
jmp 0x539936
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00525f33
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404000
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40401b
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x404052
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x40404e
jmp 0x404040
cmp esi, eax
jae 0x404052
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x404040
cmp esi, eax
jb 0x404059
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x413330
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 1
mov esi, ecx
call fcn.0045195b
mov edi, dword [section..data]
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [edi + 4]
mov dword [ebp - 4], 0x1388
call fcn.004052c0
mov eax, dword [eax]
cmp eax, dword [edi + 8]
je 0x41336e
mov edx, dword [eax + 0x14]
mov dword [ebp - 4], edx
jmp 0x413375
mov dword [ebp - 4], 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [edi + 4]
mov dword [ebp - 8], 0x1388
call fcn.004052c0
mov eax, dword [eax]
cmp eax, dword [edi + 8]
je 0x413398
mov eax, dword [eax + 0x10]
jmp 0x41339a
xor eax, eax
mov edx, dword [ebp - 4]
push edx
push eax
push 0x1388
mov ecx, esi
call fcn.0040cf60
cmp eax, 7
je 0x41342f
xor edi, edi
push edi
lea ecx, [esi + 0x29c]
call fcn.0044f55f
push edi
lea ecx, [esi + 0x228]
call fcn.0044f55f
push edi
lea ecx, [esi + 0x1b4]
call fcn.0044f55f
push edi
mov ecx, esi
call fcn.0044f55f
mov eax, dword [esi + 0x20]
push edi
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call fcn.00455c7a
mov ecx, dword [eax + 4]
push 3
push 0xf060
push ecx
call dword [sym.imp.USER32.dll_EnableMenuItem]
push 1
lea ecx, [esi + 0x140]
call fcn.0044f51d
lea edx, [ebp - 0xc]
push edx
push edi
push esi
push 0x40f690
push edi
push edi
mov dword [ebp - 0xc], edi
mov dword [esi + 0x410], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x410], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret