joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e5bd0
Capabilities:
Create thread

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push 0
push 0x14
mov dword [edi], 0
call fcn.004b17f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x4e5bf4
pop edi
lea eax, [esi + 7]
pop esi
ret
cmp byte [0x56f0fc], 0
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x18]
je 0x4e5c42
mov eax, dword [0x56f1f8]
test eax, eax
je 0x4e5c1e
push 0xc8
call eax
add esp, 4
test eax, eax
jne 0x4e5c42
lea eax, [esi + 4]
mov dword [esi + 8], ebp
push eax
push 0
push esi
push 0x4c2610
push 0
push 0
mov dword [esi + 0xc], ebx
call fcn.0050d4fc
add esp, 0x18
mov dword [esi], eax
test eax, eax
jne 0x4e5c4f
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
cmp dword [esi + 8], 0
jne 0x4e5c67
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push ebx
mov dword [esi + 4], eax
call ebp
add esp, 4
mov dword [esi + 0x10], eax
pop ebp
pop ebx
mov dword [edi], esi
xor eax, eax
pop edi
pop esi
ret
Function at 0x4e9bd0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x70
mov eax, dword [0x571134]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [0x56f1f8]
push ebp
mov ebp, dword [esp + 0x7c]
push esi
push edi
mov edi, dword [esp + 0x80]
test eax, eax
je 0x4e9c2e
push 0x28a
call eax
add esp, 4
test eax, eax
je 0x4e9c2e
mov dword [esp + 0x74], eax
lea eax, [esp + 0x6c]
push eax
push 3
push 0
push 0xc0000006
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
call dword [sym.imp.KERNEL32.dll_RaiseException]
cmp byte [edi + 0x2b], 2
mov eax, dword [edi + 0x20]
mov esi, dword [eax]
movups xmm0, xmmword [esi]
movups xmmword [esp + 0xc], xmm0
movups xmm0, xmmword [esi + 0x10]
movups xmmword [esp + 0x1c], xmm0
movups xmm0, xmmword [esi + 0x20]
movups xmmword [esp + 0x2c], xmm0
je 0x4e9c61
mov eax, dword [edi + 4]
push eax
mov ecx, dword [eax]
mov eax, dword [ecx + 0x3c]
call eax
add esp, 4
movups xmm0, xmmword [esi + 0x30]
lea ecx, [esp + 0xc]
lea edx, [esp + 0x3c]
movups xmmword [esp + 0x3c], xmm0
movups xmm0, xmmword [esi + 0x40]
movups xmmword [esp + 0x4c], xmm0
movups xmm0, xmmword [esi + 0x50]
mov esi, 0x2c
movups xmmword [esp + 0x5c], xmm0
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4e9d68
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4e9c90
cmp byte [esp + 0x18], 0
je 0x4e9d68
lea eax, [esp + 0x6c]
push eax
push 0
push 0x28
lea eax, [esp + 0x18]
push eax
push 1
call fcn.004e8170
mov eax, dword [esp + 0x80]
add esp, 0x14
cmp eax, dword [esp + 0x34]
jne 0x4e9d68
mov eax, dword [esp + 0x70]
cmp eax, dword [esp + 0x38]
jne 0x4e9d68
push ebx
lea ecx, [edi + 0x34]
mov esi, 0x2c
lea edx, [esp + 0x10]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4e9d1a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4e9cf4
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.004fb4f7
add esp, 0x70
ret
movups xmm0, xmmword [esp + 0x10]
mov dword [ebp], 1
pop ebx
movups xmmword [edi + 0x34], xmm0
movups xmm0, xmmword [esp + 0x1c]
movups xmmword [edi + 0x44], xmm0
movups xmm0, xmmword [esp + 0x2c]
movups xmmword [edi + 0x54], xmm0
movzx ecx, word [edi + 0x42]
mov eax, ecx
and ecx, 0xfe00
and eax, 1
shl eax, 0x10
add eax, ecx
mov dword [edi + 0x24], eax
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.004fb4f7
add esp, 0x70
ret
mov ecx, dword [esp + 0x78]
mov eax, 1
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004fb4f7
add esp, 0x70
ret
Function at 0x516448
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.005160ea

Function at 0x516453
Capabilities:
Read file on windows

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

Function at 0x5168d2
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x541d94
push 0x541d8c
push str.FlsAlloc
push 0x1e
call fcn.005166ff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x516906
push dword [ebp + 8]
mov ecx, esi
call dword [0x528268]
call esi
jmp 0x51690c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x516950
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x541da4
push 0x541d9c
push str.FlsGetValue
push 0x20
call fcn.005166ff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x516987
push dword [ebp + 8]
mov ecx, esi
call dword [0x528268]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x51712b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004fc410
mov eax, dword [0x571134]
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.00513bdf
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x51716d
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x5172c9
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004fc180
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 + 0x575cc8]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00517f26
mov ecx, dword [esi*4 + 0x575cc8]
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 0x5172c2
cmp eax, dword [edi + ecx + 0x24]
jne 0x5172c2
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 0x5172c2
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00517f26
add esp, 0x14
test edx, edx
jl 0x5172c2
jg 0x517238
test eax, eax
jb 0x5172c2
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x5172c2
jl 0x517252
cmp dword [ebp - 0x1008], eax
ja 0x5172c2
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x517270
test ebx, ebx
je 0x5172a9
cmp ecx, edi
jae 0x5172a9
mov al, byte [ecx]
cmp al, 0xd
jne 0x51728a
lea eax, [edi - 1]
cmp ecx, eax
jae 0x517296
cmp byte [ecx + 1], 0xa
jne 0x517296
inc ecx
jmp 0x517296
movzx eax, al
movsx eax, byte [eax + 0x5713e8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x517270
cmp edx, ebx
jne 0x517270
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x5172c7
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004fb4f7
leave
ret
Function at 0x5173c4
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 + 0x575cc8]
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 0x517404
cmp byte [ebx], 0xa
jne 0x517404
or byte [eax + edi + 0x28], 4
jmp 0x517409
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x517507
mov al, byte [edx]
cmp al, 0x1a
je 0x5174e9
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x517438
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x51745d
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x517467
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 0x51741a
jmp 0x517507
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 0x5174e4
cmp dword [ebp - 0xc], 0
je 0x5174e4
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x575cc8]
test byte [eax + edi + 0x28], 0x48
je 0x5174be
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x5174a9
mov byte [esi], dl
jmp 0x5174ba
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x575cc8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x517507
cmp byte [ebp - 1], 0xa
jne 0x5174cd
cmp esi, ebx
jne 0x5174cd
mov byte [esi], 0xa
jmp 0x517506
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00517f44
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x517507
mov byte [esi], 0xd
jmp 0x517506
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x575cc8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x517503
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x517507
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x517510
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 + 0x575cc8]
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 0x517553
cmp word [esi], dx
jne 0x517553
or byte [edi + eax + 0x28], 4
jmp 0x517558
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 0x5176ab
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 0x51768b
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x51759a
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5175d0
cmp eax, edx
jae 0x5175dc
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 0x517572
jmp 0x5176ab
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 0x517687
cmp dword [ebp - 0x14], 0
je 0x517687
mov eax, dword [ebx*4 + 0x575cc8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x51765f
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x517628
mov word [esi], cx
jmp 0x51765b
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x575cc8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x575cc8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x575cc8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x5176ab
pop ebx
cmp word [ebp - 4], bx
jne 0x517670
cmp esi, dword [ebp + 0xc]
jne 0x517670
mov word [esi], bx
jmp 0x5176a8
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00517f44
add esp, 0x10
cmp word [ebp - 4], bx
je 0x5176ab
push 0xd
jmp 0x5176a4
mov ecx, dword [ebx*4 + 0x575cc8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5176a2
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5176ab
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 0x51be8a
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 0x51bf27
push ebx
push esi
call fcn.0051be53
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.00518195
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x51bed4
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x51bf26
push edi
push eax
call fcn.00512d39
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x51bef4
call fcn.00512881
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x51bf25
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00518195
add esp, 0x20
test eax, eax
jne 0x51bf13
push edi
call fcn.00512881
jmp 0x51bf1b
push ebx
call fcn.00512881
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 0x51bf2a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x51bf3b
pop esi
ret
push ebx
push edi
push esi
call fcn.0051be53
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00512d39
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x51bf63
push ebx
push esi
push edi
call fcn.004fd090
add esp, 0xc
push 0
call fcn.00512881
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x51c6af
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0051c1d6
Function at 0x5231a5
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.00523121
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x52331d
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x52331d
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x5232cc
jg 0x5231fe
test eax, eax
je 0x5232c2
push 1
push 0x1000
call fcn.00512824
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x523224
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x5232b9
push 0x8000
push ebx
call fcn.00510845
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 0x523250
jg 0x52324b
cmp ecx, 0x1000
jb 0x523250
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00515b40
add esp, 0x10
cmp eax, 0xffffffff
je 0x523295
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 0x52324b
jl 0x52327c
test ecx, ecx
jne 0x52323d
push dword [ebp - 0xc]
push ebx
call fcn.00510845
push esi
call fcn.00512881
add esp, 0xc
xor edi, edi
jmp 0x52332e
cmp byte [edi + 0x24], 0
je 0x5232ac
cmp dword [edi + 0x20], 5
jne 0x5232ac
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x5232b7
mov edi, dword [edi + 0x18]
jmp 0x5232b9
xor edi, edi
push esi
call fcn.00512881
pop ecx
jmp 0x52332e
test ecx, ecx
jg 0x52328e
jl 0x5232cc
test eax, eax
jae 0x52328e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00517f44
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5232ef
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x52328e
jmp 0x523326
push ebx
call fcn.0051cc79
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x52328e
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 0x52332e
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x52332b
mov edi, dword [edi + 0x18]
jmp 0x52332e
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00517f44
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406930
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [esp + 0xc], ecx
je 0x406a16
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test esi, esi
jl 0x406a05
jg 0x406970
test edx, edx
je 0x406a05
nop dword [eax]
call fcn.0040b4c0
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x4069c4
jg 0x406987
test esi, esi
je 0x4069c4
cmp ebx, eax
jg 0x406997
jl 0x406991
cmp edi, esi
jae 0x406997
mov esi, edi
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push esi
push eax
mov eax, dword [ecx + 0x20]
push dword [eax]
call fcn.004331a0
mov ecx, dword [esp + 0x18]
add esp, 0xc
sub edi, esi
sbb ebx, dword [esp + 0x14]
mov eax, dword [ecx + 0x30]
sub dword [eax], esi
mov eax, dword [ecx + 0x20]
add dword [eax], esi
jmp 0x4069e9
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov edx, dword [ecx]
movzx eax, byte [eax]
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
je 0x4069ff
mov ecx, dword [esp + 0xc]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [esp + 0x10], esi
test ebx, ebx
jg 0x406970
jl 0x4069ff
test edi, edi
jne 0x406970
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
mov eax, edx
sbb esi, ebx
mov edx, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], eax
test eax, eax
je 0x406a38
mov eax, dword [ecx + 0x30]
mov eax, dword [eax]
jmp 0x406a3a
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jl 0x406ab8
jg 0x406a4d
test esi, esi
je 0x406ab8
test eax, eax
jl 0x406a9c
jg 0x406a57
test ebx, ebx
je 0x406a9c
cmp edi, eax
jg 0x406a67
jl 0x406a61
cmp esi, ebx
jae 0x406a67
mov ebx, esi
mov dword [esp + 0x14], edi
push ebx
push dword [ebp + 8]
push dword [esp + 0x18]
call fcn.004331a0
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
sub esi, ebx
sbb edi, dword [esp + 0x14]
add edx, ebx
mov eax, dword [ecx + 0x30]
sub dword [eax], ebx
mov eax, dword [ecx + 0x20]
add dword [eax], ebx
test edi, edi
jl 0x406ab8
jg 0x406a9f
test esi, esi
je 0x406ab8
jmp 0x406a9f
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x406ab8
push eax
push esi
push 1
push edx
call fcn.0043ab52
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x406ad0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], edi
test eax, eax
jg 0x406b02
jl 0x406af5
test ecx, ecx
jne 0x406b02
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x406bc2
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov ecx, ebx
call fcn.0040b4e0
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x406b6e
jg 0x406b2d
test esi, esi
je 0x406b6e
mov ecx, dword [esp + 0xc]
cmp ecx, eax
jg 0x406b45
mov eax, dword [esp + 0x10]
jl 0x406b3f
cmp eax, esi
jae 0x406b45
mov esi, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push edi
call fcn.004331a0
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
sub ecx, esi
sbb edx, dword [esp + 0x14]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x406b8f
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov edx, dword [esp + 0xc]
cmp eax, 0xffffffff
je 0x406bab
mov ecx, dword [esp + 0x10]
mov esi, 1
add ecx, 0xffffffff
mov byte [edi], al
adc edx, 0xffffffff
add edi, esi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
test edx, edx
jg 0x406b14
jl 0x406bab
test ecx, ecx
jne 0x406b14
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x10]
sbb ecx, edx
mov edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov edx, dword [eax]
test edx, edx
je 0x406c01
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x406c01
mov edi, dword [esp + 0xc]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.004331a0
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x18], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
cmp dword [ebx + 0x4c], 0
mov ecx, edi
je 0x406c70
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [esi], eax
jne 0x406c27
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov esi, dword [esp + 0xc]
mov ecx, edi
cmp edi, 0xfff
jbe 0x406c59
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.0043c7c0
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x406c84
cmp edi, eax
ja 0x406c35
test ecx, ecx
je 0x406c70
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.0043c7c0
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x406ff0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x46f08c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x407020
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40705c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40705c
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x407144
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x407084
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4070b7
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.00435d3c
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
sub eax, 0
je 0x407117
sub eax, 1
je 0x407117
sub eax, 2
jne 0x407144
push dword [esi + 0x4c]
movsx eax, byte [ebp - 0x25]
push eax
call fcn.00435d3c
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x407134
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.0043ab52
add esp, 0x10
cmp edi, eax
jne 0x407144
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x407047
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 4