joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x742008], 0x8088405
inc edx
mov dword [ebx + 0x742008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cb84
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cbb5
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cb9d
add dl, dl
jne 0x41cbc0
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cc11
xor eax, eax
add dl, dl
jne 0x41cbcd
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ccae
add dl, dl
jne 0x41cbdc
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cbe7
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cbf2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cbfd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cc07
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cbac
mov eax, 1
add dl, dl
jne 0x41cc1f
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cc2a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cc16
sub eax, ebx
mov ebx, 1
jne 0x41cc5d
mov ecx, 1
add dl, dl
jne 0x41cc43
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cc4e
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cc3a
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cbac
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41cc74
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cc7f
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cc6b
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cbac
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41cccf
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cbac
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41dffc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x72d4bb
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e0ad
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e096
test esi, esi
jbe 0x41e0ad
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088a4
test eax, eax
jne 0x41e088
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e0ad
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e065
jmp 0x41e0ad
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e0ad
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x72d4c2
ret
Function at 0x41e8f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0x72de9f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41e92b
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41e944
lea eax, [ebp - 0x10]
mov edx, dword [0x74423c]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41e957
lea eax, [ebp - 0x10]
mov edx, dword [0x74423c]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41e963
adc edx, 0
mov edx, dword [edx*4 + 0x7430d0]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406af4
mov esi, eax
cmp esi, 0xffffffff
je 0x41ea71
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d3c
test eax, eax
je 0x41ea64
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41ea64
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406d94
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d3c
test eax, eax
je 0x41ea64
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41ea64
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41ea64
cmp dx, 0x150
ja 0x41ea64
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d3c
test eax, eax
je 0x41ea64
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41ea64
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406aac
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41ea89
inc ebx
cmp ebx, 0x19
jne 0x41e91d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x72dea6
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x4048f5
Capabilities:
Hash data using sha256

Disassembly:
cmp dword [0x44e578], 2
push esi
push edi
mov edi, eax
mov esi, ecx
jl 0x404909
call fcn.00403782
mov ecx, esi
call fcn.004048d2
xor eax, eax
mov edx, dword [eax + 0x42a498]
mov ecx, dword [esi + 0xf4]
mov dword [eax + ecx], edx
add eax, 4
cmp eax, 0x20
jl 0x404912
mov eax, dword [esi + 0xf4]
xor dword [eax], 0x2080020
mov eax, dword [esi + 0xf4]
mov ecx, dword [esp + 0xc]
xor dword [eax + 8], ecx
mov esi, dword [esi + 0xf4]
or edi, 0x2000
shl edi, 0x10
xor dword [esi + 0xc], edi
pop edi
pop esi
ret 4
Function at 0x4055bf
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
test esi, esi
jbe 0x4055ec
test cl, 7
je 0x4055ec
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4305a0]
dec esi
inc ecx
jmp 0x4055cd
cmp esi, 8
jb 0x40568f
mov edx, esi
shr edx, 3
mov dword [ebp + 8], edx
push ebx
mov edx, dword [ecx + 4]
xor eax, dword [ecx]
mov ebx, edx
shr ebx, 0x10
movzx edi, bl
mov edi, dword [edi*4 + 0x4309a0]
mov ebx, edx
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x4305a0]
mov ebx, edx
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x430da0]
mov ebx, eax
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x4315a0]
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
xor edi, dword [ebx*4 + 0x4319a0]
mov ebx, eax
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x431da0]
movzx edx, dl
xor edi, dword [edx*4 + 0x4311a0]
movzx eax, al
xor edi, dword [eax*4 + 0x4321a0]
sub esi, 8
add ecx, 8
dec dword [ebp + 8]
mov eax, edi
jne 0x4055fe
pop ebx
jmp 0x40568f
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4305a0]
dec esi
inc ecx
test esi, esi
ja 0x40567b
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x405950
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d0
push ebx
push esi
mov esi, dword [ebp + 0xc]
push 0x40
pop ebx
cmp esi, ebx
jbe 0x40599a
lea eax, [ebp - 0x1d0]
push eax
call fcn.00410265
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x1d0]
push eax
call fcn.00410567
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x1d0]
push eax
call fcn.004105e0
lea eax, [ebp - 0x80]
push 0x20
mov dword [ebp + 8], eax
pop esi
xor ecx, ecx
push edi
test esi, esi
jbe 0x4059ba
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40]
sub edi, eax
lea eax, [ebp + ecx - 0x40]
mov dl, byte [edi + eax]
xor dl, 0x36
inc ecx
mov byte [eax], dl
cmp ecx, esi
jb 0x4059a9
cmp esi, ebx
jae 0x4059d2
mov ecx, ebx
sub ecx, esi
push ecx
lea eax, [ebp + esi - 0x40]
push 0x36
push eax
call fcn.0041a330
add esp, 0xc
lea eax, [ebp - 0xf0]
push eax
call fcn.00410265
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00410567
push dword [ebp + 0x14]
lea eax, [ebp - 0xf0]
push dword [ebp + 0x10]
push eax
call fcn.00410567
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.004105e0
lea eax, [ebp - 0x160]
push eax
call fcn.00410265
xor ecx, ecx
test esi, esi
jbe 0x405a3c
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40]
sub edi, eax
lea eax, [ebp + ecx - 0x40]
mov dl, byte [edi + eax]
xor dl, 0x5c
inc ecx
mov byte [eax], dl
cmp ecx, esi
jb 0x405a2b
pop edi
cmp esi, ebx
jae 0x405a55
mov ecx, ebx
sub ecx, esi
push ecx
lea eax, [ebp + esi - 0x40]
push 0x5c
push eax
call fcn.0041a330
add esp, 0xc
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.00410567
push 0x20
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.00410567
push dword [ebp + 0x18]
lea eax, [ebp - 0x160]
push eax
call fcn.004105e0
pop esi
pop ebx
leave
ret 0x14
Function at 0x405a8d
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x58]
sub esp, 0xbc
push esi
mov esi, dword [ebp + 0x6c]
push edi
push 0x40
pop eax
cmp esi, eax
jae 0x405aa6
mov eax, esi
push eax
push dword [ebp + 0x68]
lea eax, [ebp - 0x44]
push eax
call fcn.0041bda0
add esp, 0xc
lea eax, [ebp + 0x20]
push eax
mov byte [ebp + esi - 0x44], 0
mov byte [ebp + esi - 0x43], 0
mov byte [ebp + esi - 0x42], 0
mov byte [ebp + esi - 0x41], 1
add esi, 4
push esi
lea eax, [ebp - 0x44]
push eax
push dword [ebp + 0x64]
push dword [ebp + 0x60]
call fcn.00405950
push 0x20
pop esi
push esi
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp]
push eax
call fcn.0041bda0
mov eax, dword [ebp + 0x7c]
add esp, 0xc
dec eax
mov dword [ebp + 0x4c], eax
push 0x10
pop eax
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], eax
mov eax, dword [ebp + 0x70]
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x74]
mov dword [ebp + 0x44], eax
mov eax, dword [ebp + 0x78]
mov dword [ebp + 0x48], eax
xor edi, edi
mov eax, dword [ebp + edi + 0x4c]
test eax, eax
jbe 0x405b5d
mov dword [ebp + 0x6c], eax
lea eax, [ebp - 0x64]
push eax
push esi
lea eax, [ebp + 0x20]
push eax
push dword [ebp + 0x64]
push dword [ebp + 0x60]
call fcn.00405950
push esi
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp + 0x20]
push eax
call fcn.0041bda0
add esp, 0xc
xor eax, eax
mov cl, byte [ebp + eax + 0x20]
xor byte [ebp + eax], cl
inc eax
cmp eax, esi
jb 0x405b4b
dec dword [ebp + 0x6c]
jne 0x405b24
push esi
lea eax, [ebp]
push eax
push dword [ebp + edi + 0x40]
call fcn.0041bda0
add edi, 4
add esp, 0xc
cmp edi, 0xc
jb 0x405b19
push 0x44
lea eax, [ebp - 0x44]
push eax
call fcn.0040cc82
push esi
lea eax, [ebp]
push eax
call fcn.0040cc82
push esi
lea eax, [ebp + 0x20]
push eax
call fcn.0040cc82
push esi
lea eax, [ebp - 0x64]
push eax
call fcn.0040cc82
pop edi
pop esi
add ebp, 0x58
leave
ret 0x20
Function at 0x405ba8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
cmp dword [ebp + 0x1c], 0x18
push edi
mov edi, ecx
mov dword [ebp - 8], edi
ja 0x405d62
and dword [ebp - 4], 0
push ebx
push esi
lea ebx, [edi + 0x4b4]
mov eax, dword [ebp + 0x1c]
lea esi, [ebx + 0x102]
cmp dword [esi + 0x32], eax
jne 0x405bff
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.0040cd5d
test al, al
je 0x405bff
push 0x10
push dword [ebp + 0x14]
push esi
call fcn.0041a714
add esp, 0xc
test eax, eax
je 0x405d67
inc dword [ebp - 4]
add ebx, 0x178
cmp dword [ebp - 4], 4
jb 0x405bcd
mov esi, 0x200
push esi
lea eax, [ebp - 0x268]
push eax
push dword [ebp + 0x10]
call fcn.0041172e
mov ecx, dword [ebp + 0x1c]
xor eax, eax
inc eax
shl eax, cl
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x48]
push eax
push 0x10
push dword [ebp + 0x14]
lea eax, [ebp - 0x268]
push eax
call fcn.0041a570
pop ecx
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.00405a8d
push esi
lea eax, [ebp - 0x268]
push eax
call fcn.0040cc82
mov esi, dword [ebp + 0xc]
lea eax, [edi + 0xa94]
mov ecx, dword [eax]
mov edx, ecx
and edx, 3
imul edx, edx, 0x178
lea ebx, [edx + edi + 0x4b4]
inc ecx
mov dword [eax], ecx
mov eax, dword [ebp + 0x1c]
push 0x40
pop ecx
mov dword [ebx + 0x134], eax
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
push 0x10
push dword [ebp + 0x14]
lea eax, [ebx + 0x102]
push eax
movsw word es:[edi], word [esi]
call fcn.0041bda0
push 0x20
pop esi
push esi
lea eax, [ebp - 0x48]
push eax
lea edi, [ebx + 0x112]
push edi
call fcn.0041bda0
push esi
lea eax, [ebp - 0x28]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.0041bda0
push esi
lea eax, [ebp - 0x68]
push eax
add ebx, 0x158
push ebx
call fcn.0041bda0
add esp, 0x30
push 0
push 1
push esi
push edi
call fcn.0040cbd4
mov edi, dword [ebp - 8]
cmp dword [ebp + 0x20], 0
je 0x405d04
push esi
lea eax, [ebp - 0x68]
push eax
push dword [ebp + 0x20]
call fcn.0041bda0
add esp, 0xc
mov ebx, dword [ebp + 0x24]
test ebx, ebx
je 0x405d36
push 8
push 0
push ebx
call fcn.0041a330
add esp, 0xc
xor ecx, ecx
mov dl, byte [ebp + ecx - 0x28]
mov eax, ecx
and eax, 7
add eax, ebx
xor byte [eax], dl
inc ecx
cmp ecx, esi
jb 0x405d1a
push esi
lea eax, [ebp - 0x28]
push eax
call fcn.0040cc82
cmp dword [ebp + 0x18], 0
je 0x405d56
push dword [ebp + 0x18]
lea eax, [ebp - 0x48]
push 0x100
push eax
push dword [ebp + 8]
lea ecx, [edi + 0xa9c]
call fcn.0040c731
push esi
lea eax, [ebp - 0x48]
push eax
call fcn.0040cc82
pop esi
pop ebx
pop edi
leave
ret 0x20
push 0
push 0
push 0x20
pop esi
lea eax, [ebx + 0x112]
push esi
push eax
call fcn.0040cbd4
push esi
lea eax, [ebx + 0x112]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0041bda0
add esp, 0xc
push 0
push 1
push esi
lea eax, [ebx + 0x112]
push eax
call fcn.0040cbd4
push esi
lea eax, [ebx + 0x138]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0041bda0
push esi
add ebx, 0x158
lea eax, [ebp - 0x68]
push ebx
push eax
call fcn.0041bda0
add esp, 0x18
jmp 0x405cee
Function at 0x405e72
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 2
jne 0x405ebe
mov eax, dword [esi + 4]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp + 8]
push eax
push 0x20
push dword [ebp + 0xc]
call fcn.00405950
xor edx, edx
mov dword [esi + 4], edx
xor eax, eax
push ebx
movzx ebx, byte [ebp + eax - 0x20]
mov ecx, eax
and ecx, 3
shl ecx, 3
shl ebx, cl
xor edx, ebx
inc eax
cmp eax, 0x20
jb 0x405ea3
mov dword [esi + 4], edx
pop ebx
cmp dword [esi], 3
jne 0x405ee6
lea eax, [ebp - 0x20]
push eax
push 0x20
add esi, 4
push esi
push 0x20
push dword [ebp + 0xc]
call fcn.00405950
push 0x20
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.0041bda0
add esp, 0xc
pop esi
leave
ret 8
Function at 0x40824f
Capabilities:
Move file

Disassembly:
mov eax, 0x429433
call fcn.00419ff0
mov eax, 0x5028
call fcn.0041a600
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, 0x800
push esi
lea eax, [ebp - 0x5034]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x40840c
cmp eax, esi
jae 0x40840c
push esi
lea eax, [ebp - 0x4034]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x40840c
cmp eax, esi
jae 0x40840c
lea eax, [ebp - 0x5034]
push eax
call fcn.0040a0d8
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x4034]
push eax
call fcn.0040a0d8
mov edi, eax
cmp word [edi], 0
je 0x40840c
push edi
push dword [ebp - 0x10]
call fcn.004119a7
test eax, eax
je 0x40840c
push edi
push ebx
call fcn.0040a0d8
push eax
call fcn.004119a7
test eax, eax
jne 0x40840c
mov word [ebp - 0x1010], ax
xor edi, edi
cmp word [ebp - 0x1010], 0
jne 0x408368
push esi
push ebx
lea eax, [ebp - 0x1010]
push eax
call fcn.00410753
push edi
push str.rtmp_d
push esi
lea eax, [ebp - 0x1010]
push eax
call fcn.0040a0d8
push eax
call fcn.0040b8f5
add esp, 0x10
lea eax, [ebp - 0x1010]
push eax
call fcn.00408ffc
test al, al
je 0x40834f
xor eax, eax
mov word [ebp - 0x1010], ax
add edi, 0x7b
cmp edi, 0x2710
jl 0x408302
cmp word [ebp - 0x1010], 0
je 0x40840c
push esi
push ebx
lea eax, [ebp - 0x3034]
push eax
call fcn.00410753
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x3034]
push eax
call fcn.0040a242
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
lea eax, [ebp - 0x1010]
push eax
lea eax, [ebp - 0x3034]
push eax
call esi
test eax, eax
je 0x40840c
lea ecx, [ebp - 0x2034]
call fcn.004084ed
push dword [ebp + 8]
and dword [ebp - 4], 0
xor bl, bl
call fcn.00408ffc
test al, al
jne 0x4083cf
push 0x12
push dword [ebp + 8]
lea ecx, [ebp - 0x2034]
call fcn.0040868a
mov bl, al
lea eax, [ebp - 0x3034]
push eax
lea eax, [ebp - 0x1010]
push eax
call esi
test bl, bl
je 0x4083f9
lea ecx, [ebp - 0x2034]
call fcn.00408799
lea ecx, [ebp - 0x2034]
call fcn.004087e7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2034]
call fcn.004089d4
mov al, 1
jmp 0x40840e
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x408810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
mov esi, ecx
cmp dword [ebp + 0xc], ebx
je 0x4088ff
cmp dword [esi + 0xc], 1
jne 0x408834
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push edi
mov dword [ebp - 4], ebx
cmp dword [esi + 0xc], ebx
je 0x40887f
xor edi, edi
cmp dword [ebp + 0xc], ebx
jbe 0x40889e
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x408854
mov eax, ecx
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
je 0x40889e
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x408844
jmp 0x40889a
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
cmp al, bl
jne 0x4088fa
cmp byte [esi + 0x14], bl
je 0x4088fa
cmp dword [esi + 0xc], ebx
jne 0x4088fa
push ebx
lea eax, [esi + 0x1e]
mov edi, 0x4325ac
push eax
mov ecx, edi
call fcn.004062e5
test al, al
je 0x4088ee
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x408835
cmp eax, ebx
jbe 0x408835
mov edi, dword [esi]
push ebx
mov ecx, esi
call dword [edi + 0x10]
mov ecx, dword [ebp - 4]
xor ebx, ebx
sub eax, ecx
sbb edx, ebx
push edx
push eax
mov ecx, esi
call dword [edi + 0xc]
jmp 0x408835
lea eax, [esi + 0x1e]
push eax
push ebx
mov ecx, edi
call fcn.00406434
mov byte [esi + 8], 1
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x4089f7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 1
push edi
jne 0x408a11
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408a82
mov ecx, esi
call fcn.004089b1
test al, al
je 0x408a4c
mov eax, 0x4e20
cmp dword [ebp + 0xc], eax
jbe 0x408a4c
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.004089f7
jmp 0x408a85
cmp dword [esi + 0xc], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x408a63
call ebx
cmp eax, 0x6d
jne 0x408a63
xor eax, eax
jmp 0x408a85
cmp dword [esi + 0xc], 0
jne 0x408a7d
mov edi, 0x8000
cmp dword [ebp + 0xc], edi
jbe 0x408a7d
call ebx
cmp eax, 0x21
jne 0x408a7d
push edi
jmp 0x408a40
or eax, 0xffffffff
jmp 0x408a85
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a600
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
push dword [ebp + 8]
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x408ddc
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040a58c
test al, al
je 0x408ddc
lea eax, [ebp - 0x1000]
push eax
call esi
mov edi, eax
mov eax, edi
pop edi
pop esi
leave
ret 4
Function at 0x408de4
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a600
push ebx
push esi
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp + 8]
call esi
test eax, eax
setne bl
test bl, bl
jne 0x408e33
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040a58c
test al, al
je 0x408e33
push dword [ebp + 0xc]
lea eax, [ebp - 0x1000]
push eax
call esi
test eax, eax
setne bl
pop esi
mov al, bl
pop ebx
leave
ret 8

Function at 0x409020
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a600
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.00409de2
movzx eax, word [eax]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp ax, 0x2e
je 0x409056
cmp ax, 0x20
je 0x409056
push 0
push edi
call esi
test eax, eax
jne 0x409085
push edi
call fcn.00408ffc
test al, al
jne 0x409098
push 0x800
lea eax, [ebp - 0x1000]
push eax
push edi
call fcn.0040a58c
test al, al
je 0x409098
push 0
lea eax, [ebp - 0x1000]
push eax
call esi
test eax, eax
je 0x409098
cmp byte [ebp + 0xc], 0
je 0x409094
push dword [ebp + 0x10]
push edi
call fcn.00408de4
xor eax, eax
jmp 0x4090b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4090ad
cmp eax, 3
je 0x4090ad
xor eax, eax
inc eax
jmp 0x4090b0
push 2
pop eax
pop edi
pop esi
leave
ret 0xc