joyce8/EMBER2024-capa huggingface dataset:
Function at 0x546a69
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebx + 0x24]
push esi
mov dword [ebp - 8], edx
push edi
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x34]
mov esi, dword [ebx + 0x6c]
sub eax, ecx
sub eax, esi
mov dword [ebp - 4], eax
jne 0x546a95
test ecx, ecx
jne 0x546a9f
test esi, esi
jne 0x546a9f
mov eax, edx
jmp 0x546b10
cmp eax, 0xffffffff
jne 0x546a9f
push 0xfffffffffffffffe
pop eax
jmp 0x546b10
mov esi, dword [ebx + 0x24]
lea esi, [edx + esi - 0x106]
cmp ecx, esi
jb 0x546b10
mov edi, dword [ebx + 0x30]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [edi + edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x44]
mov eax, dword [ebx + 0x3c]
sub dword [ebx + 0x68], edx
sub dword [ebx + 0x64], edx
sub dword [ebx + 0x54], edx
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx esi, word [eax]
mov edi, esi
sub edi, edx
cmp esi, edx
sbb esi, esi
not esi
and esi, edi
dec ecx
mov word [eax], si
jne 0x546ad5
mov eax, dword [ebx + 0x38]
mov esi, edx
lea eax, [eax + edx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edi, ecx
sub edi, edx
cmp ecx, edx
sbb ecx, ecx
not ecx
and ecx, edi
dec esi
mov word [eax], cx
jne 0x546af4
mov eax, dword [ebp - 4]
add eax, edx
mov esi, dword [ebx]
cmp dword [esi + 4], 0
mov dword [ebp - 0xc], esi
je 0x546bbd
mov edi, dword [ebx + 0x6c]
add edi, dword [ebx + 0x64]
mov ecx, dword [esi + 4]
add edi, dword [ebx + 0x30]
cmp ecx, eax
mov dword [ebp - 4], ecx
jbe 0x546b35
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x546b3f
xor ecx, ecx
jmp 0x546b7e
sub ecx, dword [ebp - 4]
mov eax, dword [esi + 0x1c]
mov dword [esi + 4], ecx
cmp dword [eax + 0x18], 0
jne 0x546b61
push dword [ebp - 4]
push dword [esi]
push dword [esi + 0x30]
call fcn.0056d0c3
mov edx, dword [ebp - 8]
mov dword [esi + 0x30], eax
mov ecx, dword [ebp - 4]
mov esi, dword [esi]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov eax, dword [ebp - 0xc]
add dword [eax], ecx
add dword [eax + 8], ecx
add dword [ebx + 0x6c], ecx
mov edi, dword [ebx + 0x6c]
cmp edi, 3
jb 0x546ba9
mov eax, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x30]
lea esi, [eax + ecx]
movzx eax, byte [esi]
mov ecx, dword [ebx + 0x50]
mov dword [ebx + 0x40], eax
shl eax, cl
movzx ecx, byte [esi + 1]
xor eax, ecx
and eax, dword [ebx + 0x4c]
mov dword [ebx + 0x40], eax
cmp edi, 0x106
jae 0x546bbd
mov eax, dword [ebx]
cmp dword [eax + 4], 0
jne 0x546a77
pop edi
pop esi
leave
ret
Function at 0x5734df
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
push ebx
xor ebx, ebx
cmp dword [0x875da4], ebx
push esi
push edi
jne 0x573568
lea eax, [ebp - 0x270]
push 0x208
push eax
mov dword [0x875da4], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x270]
push str._atl.dll
push eax
call fcn.00479940
pop ecx
lea eax, [ebp - 0x270]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x5735ee
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.AtlAxWinInit
push edi
call esi
push str.AtlAxCreateControl
push edi
mov dword [0x875d90], eax
call esi
push str.AtlAxGetControl
push edi
mov dword [0x875d98], eax
call esi
mov dword [0x875d94], eax
push 0x13
mov esi, str.d27cdb6e_ae6d_11cf_96b8_444553540000
pop ecx
lea edi, [ebp - 0x68]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x14], 0xd27cdb6c
mov word [ebp - 0x10], 0xae6d
mov word [ebp - 0xe], 0x11cf
mov byte [ebp - 0xc], 0x96
mov byte [ebp - 0xb], 0xb8
mov byte [ebp - 0xa], 0x44
mov byte [ebp - 9], 0x45
mov byte [ebp - 8], 0x53
mov byte [ebp - 7], 0x54
mov byte [ebp - 6], bl
mov byte [ebp - 5], bl
mov dword [ebp - 4], ebx
movsw word es:[edi], word [esi]
call dword [0x875d90]
push ebx
push ebx
push dword [ebp + 8]
lea eax, [ebp - 0x68]
push eax
call dword [0x875d98]
test eax, eax
jne 0x5735ea
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call dword [0x875d94]
test eax, eax
jne 0x5735ea
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x14]
push 0x875da0
push edx
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
je 0x5735fe
xor eax, eax
jmp 0x573638
push ebx
push ebx
push str.ATL.DLL
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x5735ea
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [0x875da0]
push dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x58]
mov eax, dword [0x875da0]
lea edx, [ebp - 0x18]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x875da0]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x70]
inc dword [0x875d9c]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x575a64
Capabilities:
Encode data using xor

Disassembly:
push edi
push esi
push ebp
push ebx
push esi
mov dword [esp], eax
test eax, eax
je 0x575b11
mov esi, eax
mov edx, dword [esi]
xor eax, eax
mov byte [edx + 0x16], al
mov ecx, dword [esi]
mov byte [ecx + 0x17], al
mov ebx, dword [esi]
mov byte [ebx + 0x18], al
mov ebp, dword [esi]
mov byte [ebp + 0x19], al
mov ebp, dword [esi + 4]
test ebp, ebp
jle 0x575abb
mov eax, esi
mov edx, dword [eax]
xor ecx, ecx
xor ebx, ebx
movzx esi, byte [edx + ebx]
mov edi, ecx
shl edi, 8
shr ecx, 0x18
xor ecx, esi
mov eax, ecx
mov ecx, edi
xor ecx, dword [eax*4 + 0x598fc0]
inc ebx
cmp ebx, ebp
jl 0x575a9b
jmp 0x575ac1
mov eax, esi
mov edx, dword [eax]
xor ecx, ecx
mov eax, dword [esp]
mov edi, dword [eax + 0xc]
test edi, edi
jle 0x575aef
mov ebp, dword [eax + 8]
xor esi, esi
movzx eax, byte [ebp + esi]
mov ebx, ecx
shl ebx, 8
shr ecx, 0x18
xor ecx, eax
mov eax, ecx
mov ecx, ebx
xor ecx, dword [eax*4 + 0x598fc0]
inc esi
cmp esi, edi
jl 0x575ad0
mov esi, dword [esp]
mov byte [edx + 0x16], cl
mov ebp, dword [esi]
mov eax, ecx
shr eax, 8
mov byte [ebp + 0x17], al
mov ebx, dword [esi]
mov edx, ecx
shr edx, 0x10
mov byte [ebx + 0x18], dl
mov edi, dword [esi]
shr ecx, 0x18
mov byte [edi + 0x19], cl
pop ecx
pop ebx
pop ebp
pop esi
pop edi
ret
Function at 0x403240
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, ecx
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea edi, [eax + 1]
test edi, edi
js 0x4032bd
mov esi, dword [ebp + 8]
mov ecx, 1
mov edx, dword [esi]
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or ecx, eax
jge 0x403277
push edi
mov ecx, esi
call fcn.004031e0
mov edx, dword [esi]
push edi
push edx
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov edi, eax
mov ecx, edi
cmp edi, 0xffffffff
jne 0x40329e
mov ecx, dword [esi]
test ecx, ecx
je 0x4032a2
push dword [ecx - 8]
push ecx
call fcn.004788dc
add esp, 8
mov ecx, eax
test ecx, ecx
js 0x4032bd
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x4032bd
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 4
push 0x80070057
call fcn.004036f0
int3
Function at 0x406360
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x4cb06c]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
mov ebx, ecx
mov dword [esp + 8], 0
mov ecx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 4]
or eax, 0x2001f
mov dword [esp + 0xc], ecx
push eax
push ecx
push dword [ebx]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
call fcn.00406270
mov esi, eax
test esi, esi
je 0x4063e1
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4063c8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 0
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x100
push eax
lea eax, [esp + 0x3c]
push eax
push 0
push dword [esp + 0x2c]
call edi
test eax, eax
jne 0x406449
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x14]
call fcn.00406360
mov esi, eax
test esi, esi
jne 0x40649b
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0x100
push eax
push esi
push esi
push esi
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x3c]
push eax
push esi
push dword [esp + 0x2c]
call edi
test eax, eax
je 0x406410
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x406462
push eax
call esi
mov dword [esp + 0x10], 0
push dword [esp + 0xc]
mov ecx, ebx
mov dword [esp + 0x18], 0
call fcn.004064f0
mov ecx, dword [esp + 0x10]
mov edi, eax
test ecx, ecx
je 0x406482
push ecx
call esi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4063c8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x22c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
Function at 0x4071f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49a7b3
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x4cb06c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x20], 0
push 0x404
lea eax, [ebp - 0x424]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], 0
call fcn.00475700
add esp, 0xc
mov dword [ebp - 0x424], 0
push 0x60
push 0
mov byte [ebp - 4], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push edi
call ebx
mov esi, eax
mov dword [ebp - 0x430], esi
test esi, esi
jne 0x4072a9
push 2
push eax
push edi
call ebx
mov esi, eax
mov dword [ebp - 0x430], eax
test esi, esi
jne 0x4072a9
call fcn.00405640
mov edi, eax
jmp 0x4073c5
push dword [ebp - 0x428]
push dword [ebp - 0x42c]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x4072cc
call fcn.00405640
jmp 0x4073b8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x42c], ebx
test ebx, ebx
jne 0x4072ea
call fcn.00405640
jmp 0x4073b8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov dword [ebp - 0x428], edi
lea eax, [edi + 1]
cmp eax, edi
jae 0x40730b
mov edi, 0x8007000e
jmp 0x4073ba
mov ecx, 2
mov byte [ebp - 4], 2
mul ecx
test edx, edx
ja 0x407400
jb 0x407329
cmp eax, 0xffffffff
ja 0x407400
cmp eax, 0x400
jbe 0x40733e
push eax
lea ecx, [ebp - 0x424]
call fcn.00405610
jmp 0x407364
lea eax, [ebp - 0x420]
mov dword [ebp - 0x424], eax
jmp 0x407364
mov dword [ebp - 4], 1
cmp dword [ebp - 0x424], 0
jne 0x40737b
mov edi, 0x8007000e
jmp 0x4073ba
push edi
push dword [ebp - 0x424]
push edi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
jne 0x40739b
call fcn.00405640
jmp 0x4073b8
mov eax, dword [ebp - 0x424]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x424]
call fcn.00407090
mov edi, eax
test esi, esi
je 0x4073c5
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x420]
cmp dword [ebp - 0x424], eax
je 0x4073e0
lea ecx, [ebp - 0x424]
call fcn.004055f0
nop
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 0x10
push 0x80070216
call fcn.004036f0
int3
Function at 0x408050
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 0x408138
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 0x408127
jg 0x408090
test edx, edx
je 0x408127
nop dword [eax]
call fcn.00409a40
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x4080e4
jg 0x4080a7
test esi, esi
je 0x4080e4
cmp ebx, eax
jg 0x4080b7
jl 0x4080b1
cmp edi, esi
jae 0x4080b7
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.00474c00
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 0x40810b
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x10]
movzx eax, byte [eax]
push eax
call edx
cmp eax, 0xffffffff
je 0x408121
mov ecx, dword [esp + 0xc]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [esp + 0x10], esi
test ebx, ebx
jg 0x408090
jl 0x408121
test edi, edi
jne 0x408090
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 0x40815a
mov eax, dword [ecx + 0x30]
mov eax, dword [eax]
jmp 0x40815c
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jl 0x4081da
jg 0x40816f
test esi, esi
je 0x4081da
test eax, eax
jl 0x4081b4
jg 0x408179
test ebx, ebx
je 0x4081b4
cmp edi, eax
jg 0x408189
jl 0x408183
cmp esi, ebx
jae 0x408189
mov ebx, esi
mov dword [esp + 0x14], edi
push ebx
push dword [ebp + 8]
push dword [esp + 0x18]
call fcn.00474c00
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, ebx
sub esi, ebx
mov eax, dword [ecx + 0x30]
sbb edi, dword [esp + 0x14]
sub dword [eax], ebx
mov eax, dword [ecx + 0x20]
add dword [eax], ebx
jmp 0x4081b7
mov edx, dword [ebp + 8]
test edi, edi
jl 0x4081da
jg 0x4081c1
test esi, esi
je 0x4081da
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x4081da
push eax
push esi
push 1
push edx
call fcn.004797ae
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 0x4081f0
Capabilities:
Read 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 0x4082db
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 0x4082ca
jg 0x408230
test edx, edx
je 0x4082ca
nop dword [eax]
call fcn.00409a60
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x408287
jg 0x408247
test esi, esi
je 0x408287
cmp ebx, eax
jg 0x408257
jl 0x408251
cmp edi, esi
jae 0x408257
mov esi, edi
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0xc]
push esi
mov eax, dword [eax + 0x1c]
push dword [eax]
push dword [esp + 0x18]
call fcn.00474c00
mov ecx, dword [esp + 0x18]
add esp, 0xc
sub edi, esi
sbb ebx, dword [esp + 0x14]
mov eax, dword [ecx + 0x2c]
sub dword [eax], esi
mov eax, dword [ecx + 0x1c]
add dword [eax], esi
mov eax, dword [esp + 0x10]
jmp 0x4082ac
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x4082c4
mov eax, dword [esp + 0x10]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
mov byte [eax], cl
mov ecx, dword [esp + 0xc]
add eax, esi
mov dword [esp + 0x10], eax
test ebx, ebx
jg 0x408230
jl 0x4082c4
test edi, edi
jne 0x408230
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 + 0x1c]
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 0x4082fd
mov eax, dword [ecx + 0x2c]
mov eax, dword [eax]
jmp 0x4082ff
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jl 0x4083b5
jg 0x40831a
test esi, esi
je 0x4083b5
test eax, eax
jl 0x408363
jg 0x408324
test ebx, ebx
je 0x408363
cmp edi, eax
jg 0x408334
jl 0x40832e
cmp esi, ebx
jae 0x408334
mov ebx, esi
mov dword [esp + 0x14], edi
push ebx
push dword [esp + 0x14]
push dword [ebp + 8]
call fcn.00474c00
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, ebx
sub esi, ebx
mov dword [esp + 0x10], edx
mov eax, dword [ecx + 0x2c]
sbb edi, dword [esp + 0x14]
sub dword [eax], ebx
mov eax, dword [ecx + 0x1c]
add dword [eax], ebx
jmp 0x40836a
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test edi, edi
jl 0x4083b5
jg 0x408374
test esi, esi
je 0x4083b5
mov edx, dword [ecx + 0x4c]
test edx, edx
je 0x4083b5
mov ebx, dword [ecx + 0xc]
lea eax, [ecx + 0x3c]
cmp dword [ebx], eax
jne 0x4083a0
mov edx, dword [ecx + 0x54]
mov ecx, dword [ecx + 0x50]
sub edx, ecx
mov dword [ebx], ecx
mov ebx, dword [esp + 0xc]
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov edx, dword [ebx + 0x4c]
push edx
push esi
push 1
push dword [esp + 0x1c]
call fcn.004799fb
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 0x408730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4cb06c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x408760
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40879c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40879c
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.0045d468
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x408883
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x4087c4
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 0x4087f7
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.00479cb8
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.0045d468
mov esp, ebp
pop ebp
ret 4
mov byte [ebp - 0x28], bl
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call edx
test eax, eax
js 0x408883
cmp eax, 1
jle 0x408856
cmp eax, 3
jne 0x408883
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.0040dc70
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x408873
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.004797ae
add esp, 0x10
cmp edi, eax
jne 0x408883
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x408787
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
Function at 0x409880
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4cb06c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x38], 0
je 0x409923
cmp byte [esi + 0x3d], 0
je 0x409923
mov eax, dword [esi]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4098d9
mov ecx, dword [esi + 0x38]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call edx
sub eax, 0
je 0x4098eb
sub eax, 1
je 0x4098ef
sub eax, 2
je 0x409923
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d468
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40990c
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.004797ae
add esp, 0x10
cmp edi, eax
jne 0x4098d9
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d468
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
xor ecx, ebp
pop esi
call fcn.0045d468
mov esp, ebp
pop ebp
ret

Function at 0x40a8e0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49aa60
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x4cb06c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.0045d997
mov esi, eax
xorps xmm0, xmm0
movq qword [esi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.0045a2b0
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret