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

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
cmp dword [esi + 0x20], 0
mov ebx, dword [esi + 8]
mov dword [esp + 0x10], ebx
je 0x4d709e
push 0
push 0
push str.hb_cdxIndexGetAvailPage_on_readonly_database.
push 0x238d
call fcn.0044a4a0
add esp, 0x10
cmp dword [esi + 0x1c], 0
je 0x4d70c0
cmp dword [esi + 0x40], 0
jne 0x4d70c0
push 0
push 0
push str.hb_cdxIndexGetAvailPage_on_not_locked_index_file.
push 0x238e
call fcn.0044a4a0
add esp, 0x10
mov edi, dword [esi + 0x38]
test edi, edi
je 0x4d715a
cmp edi, 0xffffffff
je 0x4d715a
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x4d7162
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x4d7105
mov ecx, dword [eax]
mov dword [esi + 0x38], ecx
mov ecx, dword [eax + 8]
push eax
mov dword [esi + 0x3c], ecx
call fcn.0047f840
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp dword [esi + 0x28], 0
je 0x4d7111
movzx ecx, word [esi + 0x30]
jmp 0x4d7113
xor ecx, ecx
mov eax, edi
xor edx, edx
call fcn.0052a2a0
push edx
push eax
push 4
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004553d0
add esp, 0x14
cmp eax, 4
je 0x4d7149
push 0
push 0
push str.hb_cdxIndexGetAvailPage:_Read_index_page_failed.
push 0x3f2
call fcn.0044a4a0
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x38], eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x4d7168
movzx eax, word [esi + 0x2c]
jmp 0x4d716c
movzx eax, word [esi + 0x2e]
mov edi, dword [esi + 0x34]
xor ebx, ebx
movzx eax, ax
mov edx, edi
mov dword [esp + 0x14], eax
cmp edi, 0xffffffff
jne 0x4d71a6
cmp dword [esi + 0x28], ebx
je 0x4d718a
movzx edi, word [esi + 0x30]
jmp 0x4d718c
xor edi, edi
push dword [esp + 0x10]
call fcn.004554a0
add esp, 4
mov ecx, edi
call fcn.0052a2c0
mov edi, eax
mov edx, eax
mov dword [esi + 0x34], edi
movzx eax, word [esi + 0x2e]
mov dword [esp + 0x1c], eax
nop
cmp dword [esi + 0x28], 0
je 0x4d71ba
xor ecx, ecx
jmp 0x4d71be
movzx ecx, word [esi + 0x30]
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x14]
add edx, eax
mov eax, dword [esp + 0x1c]
add ebx, eax
cmp ebx, ecx
jb 0x4d71b0
mov dword [esi + 0x34], edx
test ebp, ebp
je 0x4d727c
cmp ecx, eax
cmovae eax, ecx
push eax
push 0
push eax
mov dword [esp + 0x28], eax
call fcn.0047f870
add esp, 4
push eax
call fcn.0052b3e0
lea ecx, [esi + 0x48]
mov ebp, eax
push ecx
push dword [esi + 8]
push dword [esi + 0xc]
call fcn.004b9c70
add esp, 0x18
test eax, eax
jne 0x4d7227
push eax
push eax
push str.hb_cdxIndexLockFlush:_flush_lock_failed.
push 0x2395
call fcn.0044a4a0
add esp, 0x10
cmp dword [esi + 0x28], 0
je 0x4d7233
movzx ecx, word [esi + 0x30]
jmp 0x4d7235
xor ecx, ecx
mov eax, edi
xor edx, edx
call fcn.0052a2a0
mov ebx, dword [esp + 0x1c]
push edx
push eax
push ebx
push ebp
push dword [esp + 0x20]
call fcn.00455870
add esp, 0x14
cmp eax, ebx
je 0x4d726c
push 0
push 0
push str.Write_in_index_page_failed.
push 0x3f3
call fcn.0044a4a0
add esp, 0x10
push ebp
mov dword [esi + 0x78], 1
call fcn.0047f840
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x4da970
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c]
push edi
test byte [esi + 0x20], 2
mov eax, dword [esi + 0x40]
mov ebx, dword [esi + 0x10]
movzx eax, word [eax + 0x16]
mov dword [esp + 0x1c], eax
lea ebp, [eax + 8]
jne 0x4da9a8
push 0
push 0
push str.hb_cdxPageLeafDelKey:_page_is_not_a_leaf.
push 0x23f1
call fcn.0044a4a0
add esp, 0x10
test ebx, ebx
js 0x4da9b1
cmp ebx, dword [esi + 0xc]
jl 0x4da9c7
push 0
push 0
push str.hb_cdxPageLeafDelKey:_wrong_iKey_index.
push 0x23f1
call fcn.0044a4a0
add esp, 0x10
mov edi, dword [esi + 0x34]
test edi, edi
jne 0x4da9e9
mov eax, dword [esi + 0xc]
imul eax, ebp
push eax
call fcn.0047f870
mov edi, eax
push edi
push esi
call fcn.004da7d0
add esp, 0xc
mov dword [esi + 0x34], edi
lea ecx, [ebx + 1]
imul ecx, ebp
mov dword [esp + 0x18], ecx
movzx eax, word [ecx + edi - 4]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x40]
movzx edx, word [eax + 0x16]
movzx eax, word [ecx + edi - 2]
movzx ecx, byte [esi + 0x1f]
sub ecx, eax
mov eax, dword [esi + 0xc]
sub ecx, dword [esp + 0x14]
dec eax
add ecx, edx
mov dword [esp + 0x10], ecx
cmp ebx, eax
jge 0x4daab6
lea eax, [ebx + 2]
xor ecx, ecx
imul eax, ebp
sub eax, 4
mov dword [esp + 0x28], eax
movzx eax, word [edi + eax]
sub dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
test ebx, ebx
jle 0x4daaa3
mov esi, dword [esp + 0x18]
lea eax, [ebx - 1]
mov ecx, dword [esp + 0x14]
imul eax, ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
add eax, edi
movzx eax, word [eax + esi + 6]
mov esi, dword [esp + 0x30]
sub edx, eax
mov eax, dword [esp + 0x20]
cmp eax, ecx
mov dword [esp + 0x1c], edx
cmovb ecx, eax
cmp ecx, edx
jle 0x4daa7b
mov ecx, edx
jmp 0x4daaa3
jge 0x4daaa3
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
lea edx, [edi + esi]
mov edi, dword [esp + 0x1c]
add edx, ecx
sub eax, esi
mov esi, eax
mov al, byte [edx]
cmp al, byte [esi + edx]
jne 0x4daa9f
inc ecx
inc edx
cmp ecx, edi
jl 0x4daa92
mov esi, dword [esp + 0x30]
mov eax, dword [esi + 0x34]
mov edx, dword [esp + 0x28]
add dword [esp + 0x10], ecx
mov word [edx + eax], cx
mov ecx, dword [esp + 0x10]
mov edi, dword [esi + 0xc]
add word [esi + 0x32], cx
dec edi
movzx eax, word [esi + 0x32]
mov dword [esi + 0xc], edi
cmp edi, ebx
jle 0x4daaed
mov eax, dword [esp + 0x18]
sub edi, ebx
add eax, dword [esi + 0x34]
imul edi, ebp
imul ebp, ebx
push edi
add ebp, dword [esi + 0x34]
push eax
push ebp
call fcn.0052ae60
mov edi, dword [esi + 0xc]
add esp, 0xc
movzx eax, word [esi + 0x32]
xor edx, edx
movzx ebp, ax
cmp ebx, edi
mov dword [esi + 0x24], 1
mov dword [esi + 0x28], 1
setge dl
test edi, edi
jne 0x4dab0e
or edx, 4
jmp 0x4dab16
test bp, bp
jns 0x4dab16
or edx, 2
movzx ecx, byte [esi + 0x1f]
mov eax, edx
pop edi
or eax, 8
cmp bp, cx
pop esi
pop ebp
cmovl eax, edx
pop ebx
add esp, 0x1c
ret
Function at 0x4e8960
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi]
inc eax
push eax
call fcn.0047f870
push dword [edi]
mov esi, eax
push dword [esp + 0x18]
push esi
call fcn.0052ae60
mov ecx, dword [edi]
add esp, 0x10
cmp dword [esp + 0xc], 1
mov byte [esi + ecx], 0
jne 0x4e899c
xor eax, eax
cmp dword [edi], eax
jbe 0x4e899c
xor byte [eax + esi], 0xf3
inc eax
cmp eax, dword [edi]
jb 0x4e8993
pop edi
mov eax, esi
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4e9c90
push esi
push edi
push eax
call fcn.004495b0
add esp, 4
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4e9c7c
test al, 0x10
je 0x4e9c7c
mov esi, 1
jmp 0x4e9c7e
xor esi, esi
test edi, edi
je 0x4e9c8b
push edi
call fcn.0047f840
add esp, 4
pop edi
mov eax, esi
pop esi
ret
xor eax, eax
ret

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

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4e9f50
push esi
push edi
push eax
call fcn.004495b0
add esp, 4
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4e9f3c
test al, 0x50
jne 0x4e9f3c
mov esi, 1
jmp 0x4e9f3e
xor esi, esi
test edi, edi
je 0x4e9f4b
push edi
call fcn.0047f840
add esp, 4
pop edi
mov eax, esi
pop esi
ret
xor eax, eax
ret

Function at 0x4eb520
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
push edi
push dword [esp + 0x10]
xor ebx, ebx
call fcn.0046f5d0
add esp, 4
mov edi, eax
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
test ebp, ebp
je 0x4eb570
lea eax, [ebp*2]
push esi
push eax
call fcn.0047f870
add esp, 4
mov esi, eax
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
call fcn.0046f4f0
push esi
mov ebx, eax
call fcn.0047f840
add esp, 8
pop esi
push edi
call fcn.0047f840
add esp, 4
mov eax, ebx
pop edi
pop ebp
pop ebx
ret
Function at 0x529940
Capabilities:
Get common file path

Disassembly:
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, dword [esp + 0x10]
mov esi, eax
test esi, esi
je 0x5299a1
test edi, edi
je 0x52996d
xor ecx, ecx
cmp word [edi], cx
je 0x52996a
inc ecx
cmp word [edi + ecx*2], 0
jne 0x529962
inc esi
add esi, ecx
lea eax, [esi + esi]
push eax
call fcn.0047f870
add esp, 4
mov ebx, eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test edi, edi
je 0x5299ca
dec esi
push esi
push 0x74949c
push ebx
call fcn.005299f0
push esi
push edi
push ebx
call fcn.005299f0
add esp, 0x18
jmp 0x5299ca
xor esi, esi
cmp word [edi], si
je 0x5299b0
inc esi
cmp word [edi + esi*2], 0
jne 0x5299a8
lea esi, [esi*2 + 2]
push esi
call fcn.0047f870
push esi
mov ebx, eax
push edi
push ebx
call fcn.0052ae60
add esp, 0x10
push 8
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push ebx
mov esi, eax
call fcn.0047f840
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
ret

Function at 0x52aafe
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x52ab3d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x52ab3d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x52ab3d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x52ab3d
cmp dword [ecx + 0x74], 0xe
jbe 0x52ab3d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x5360cd
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00529ea0
mov eax, dword [0x7e4788]
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.0053b19d
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x53610f
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x53626b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0052a1f0
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 + 0x7f0190]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0053eaef
mov ecx, dword [esi*4 + 0x7f0190]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x536264
cmp eax, dword [ecx + edi + 0x24]
jne 0x536264
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x536264
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0053eaef
add esp, 0x14
test edx, edx
jl 0x536264
jg 0x5361da
test eax, eax
jb 0x536264
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x536264
jl 0x5361f4
cmp dword [ebp - 0x1008], eax
ja 0x536264
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x536212
test ebx, ebx
je 0x53624b
cmp ecx, edi
jae 0x53624b
mov al, byte [ecx]
cmp al, 0xd
jne 0x53622c
lea eax, [edi - 1]
cmp ecx, eax
jae 0x536238
cmp byte [ecx + 1], 0xa
jne 0x536238
inc ecx
jmp 0x536238
movzx eax, al
movsx eax, byte [eax + 0x7e49a0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x536212
cmp edx, ebx
jne 0x536212
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x536269
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00529c8c
leave
ret

Function at 0x53bd75
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x74bd60
push 0x74bd58
push str.FlsAlloc
push 0x1f
call fcn.0053bc91
mov esi, eax
add esp, 0x10
test esi, esi
je 0x53bda9
push dword [ebp + 8]
mov ecx, esi
call dword [0x55aa8c]
call esi
jmp 0x53bdaf
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x53bdf3
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x74bd70
push 0x74bd68
push str.FlsGetValue
push 0x21
call fcn.0053bc91
mov esi, eax
add esp, 0x10
test esi, esi
je 0x53be2a
push dword [ebp + 8]
mov ecx, esi
call dword [0x55aa8c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x53be32
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x74bd78
push 0x74bd70
push str.FlsSetValue
push 0x22
call fcn.0053bc91
mov esi, eax
add esp, 0x10
test esi, esi
je 0x53be6c
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x55aa8c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x53dd85
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x7f0190]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x53ddc5
cmp byte [ebx], 0xa
jne 0x53ddc5
or byte [edi + eax + 0x28], 4
jmp 0x53ddca
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x53dec9
mov dl, byte [eax]
cmp dl, 0x1a
je 0x53deac
inc eax
cmp dl, 0xd
je 0x53ddf6
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x53de1c
cmp eax, ecx
jae 0x53de2a
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x53ddde
jmp 0x53dec9
push 0
lea eax, [ebp - 0x10]
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 0x53dea7
cmp dword [ebp - 0x10], 0
je 0x53dea7
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x7f0190]
test byte [eax + edi + 0x28], 0x48
je 0x53de81
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x53de6c
mov byte [esi], dl
jmp 0x53de7d
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x7f0190]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x53dec9
cmp byte [ebp - 1], 0xa
jne 0x53de90
cmp esi, ebx
jne 0x53de90
mov byte [esi], 0xa
jmp 0x53dec8
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0053eb0d
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x53dec9
mov byte [esi], 0xd
jmp 0x53dec8
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x7f0190]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x53dec6
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x53dec9
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x53ded2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x7f0190]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x53df18
cmp word [ebx], dx
jne 0x53df18
or byte [eax + edi + 0x28], 4
jmp 0x53df1d
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x53e080
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x53e060
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x53df5e
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x53df94
cmp eax, edx
jae 0x53dfa2
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x53df39
jmp 0x53e080
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x53e05b
cmp dword [ebp - 0x18], 0
je 0x53e05b
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x7f0190]
test byte [eax + edi + 0x28], 0x48
je 0x53e031
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x53dff5
mov word [esi], cx
jmp 0x53e02c
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x7f0190]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x7f0190]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x7f0190]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x53e080
pop eax
cmp word [ebp - 4], ax
jne 0x53e041
cmp esi, ebx
jne 0x53e041
mov word [esi], ax
jmp 0x53e07d
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0053eb0d
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x53e080
push 0xd
pop eax
jmp 0x53e03c
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x7f0190]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x53e07a
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x53e080
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x54110c
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 0x5411a9
push ebx
push esi
call fcn.005410d5
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.00541069
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x541156
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5411a8
push edi
push eax
call fcn.00539f93
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x541176
call fcn.00539f59
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5411a7
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00541069
add esp, 0x20
test eax, eax
jne 0x541195
push edi
call fcn.00539f59
jmp 0x54119d
push ebx
call fcn.00539f59
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 0x5470f5
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]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00547071
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x547264
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x547264
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x547219
jg 0x547151
test eax, eax
je 0x54720f
push 1
push 0x1000
call fcn.0053bb1b
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x547174
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x547206
push 0x8000
push ebx
call fcn.00538c27
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x54719d
jg 0x547198
cmp ecx, 0x1000
jb 0x54719d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0053d39b
add esp, 0x10
cmp eax, 0xffffffff
je 0x5471e2
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 0x547198
jl 0x5471c9
test ecx, ecx
jne 0x54718a
push dword [ebp - 0xc]
push ebx
call fcn.00538c27
push esi
call fcn.00539f59
add esp, 0xc
xor ebx, ebx
jmp 0x547272
cmp byte [edi + 0x24], 0
je 0x5471f9
cmp dword [edi + 0x20], 5
jne 0x5471f9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x547204
mov ebx, dword [edi + 0x18]
jmp 0x547206
xor ebx, ebx
push esi
call fcn.00539f59
pop ecx
jmp 0x547272
test ecx, ecx
jg 0x5471db
jl 0x547219
test eax, eax
jae 0x5471db
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0053eb0d
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x547239
cmp byte [edi + 0x1c], 0
je 0x5471db
jmp 0x54726a
push ebx
call fcn.00541576
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5471db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x547272
cmp byte [edi + 0x1c], 0
je 0x54726f
mov ebx, dword [edi + 0x18]
jmp 0x547272
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0053eb0d
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x54ba80
Capabilities:
Compute adler32 checksum

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
movzx ecx, si
shr esi, 0x10
test edi, edi
je 0x54bb9b
push ebp
mov ebp, dword [esp + 0x18]
test ebp, ebp
je 0x54bb9a
push ebx
mov edx, 0x15b0
cmp ebp, edx
cmovb edx, ebp
sub ebp, edx
cmp edx, 0x10
jl 0x54bb5b
mov ebx, edx
shr ebx, 4
mov eax, ebx
neg eax
shl eax, 4
add edx, eax
nop dword [eax]
movzx eax, byte [edi]
add ecx, eax
movzx eax, byte [edi + 1]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 2]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 3]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 4]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 5]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 6]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 7]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 8]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 9]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 0xa]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 0xb]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 0xc]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 0xd]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 0xe]
add esi, ecx
add ecx, eax
movzx eax, byte [edi + 0xf]
add esi, ecx
add edi, 0x10
add ecx, eax
add esi, ecx
sub ebx, 1
jne 0x54bad0
test edx, edx
je 0x54bb6d
nop
movzx eax, byte [edi]
inc edi
add ecx, eax
add esi, ecx
sub edx, 1
jne 0x54bb60
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul eax, edx, 0xffff000f
add ecx, eax
mov eax, 0x80078071
mul esi
shr edx, 0xf
imul edx, edx, 0xffff000f
add esi, edx
test ebp, ebp
jne 0x54baa6
pop ebx
pop ebp
shl esi, 0x10
or esi, ecx
pop edi
mov eax, esi
pop esi
ret