joyce8/EMBER2024-capa huggingface dataset:
Function at 0x521f90
Capabilities:
Read file via mapping

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x521fa1
xor al, al
pop esi
ret 4
push 0x5aa648
push 0
push 0
push 4
push 0
call fcn.00528030
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi], eax
test eax, eax
je 0x521f9b
push 0
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
xor ecx, ecx
test eax, eax
mov dword [esi + 4], eax
setne cl
mov al, cl
pop esi
ret 4

Function at 0x523250
Capabilities:
Enumerate pe sections

Disassembly:
push 0xffffffffffffffff
push 0x591538
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x24]
mov eax, dword [eax + 0x20]
lea ebx, [eax + 0x16]
push 0
push ebx
lea ecx, [esp + 0x1c]
call fcn.00521dc0
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + 0x3c]
mov edi, dword [esp + 0x18]
movzx ebp, word [eax + 0x24]
shr ecx, 4
mov dword [esp + 0x28], 0
test cl, 1
je 0x5232df
mov ecx, eax
mov edx, dword [ecx + 0x3c]
and edx, 0x70
cmp dl, 0x70
jne 0x5232cb
push 1
call fcn.00526c10
mov eax, dword [esi + 0x24]
xor ecx, ecx
mov word [eax + 4], cx
jmp 0x5232df
push ebx
call fcn.00526c10
mov edx, dword [esi + 0x14]
movzx eax, word [edx + 0x24]
mov ecx, dword [esi + 0x24]
mov word [ecx + 4], ax
mov eax, dword [esi + 0x24]
cmp word [eax + 4], bp
je 0x5232fc
mov edx, dword [esi + 0x14]
mov ecx, dword [edx + 0x3c]
and ecx, 0x70
cmp cl, 0x70
je 0x5232fc
xor edx, edx
mov word [eax + 8], dx
mov eax, dword [esi + 0x24]
mov ecx, dword [0x61f798]
mov eax, dword [eax + 0x20]
mov dword [edi], ecx
mov edx, dword [esi + 0x24]
movzx ecx, word [edx + 4]
mov word [edi + 4], cx
mov ecx, dword [esi + 0x24]
movzx ecx, word [ecx + 6]
mov word [edi + 6], cx
mov edx, dword [esi + 0x24]
movzx ecx, word [edx + 8]
mov word [edi + 8], cx
mov ecx, dword [esi + 0x24]
movzx ecx, word [ecx + 0xa]
mov word [edi + 0xa], cx
mov edx, dword [esi + 0x24]
mov ecx, dword [edx + 0xc]
mov dword [edi + 0xc], ecx
mov ecx, dword [esi + 0x24]
mov ecx, dword [ecx + 0x10]
mov dword [edi + 0x10], ecx
mov word [edi + 0x14], ax
mov edx, dword [esi + 0x24]
mov ecx, dword [edx + 0x1c]
movzx eax, ax
push eax
push ecx
add edi, 0x16
push edi
call fcn.00500790
add esp, 0xc
cmp ebx, 0xffffffff
jbe 0x523374
push 0
push 0xd7
call fcn.0051e510
mov ecx, dword [esp + 0x18]
push 1
push ebx
push ecx
mov ecx, dword [esi + 0x14]
call fcn.00526c60
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.00521df0
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x524080
Capabilities:
Set file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x1c
push 1
push eax
lea ecx, [esp + 8]
push ecx
call fcn.00528ad0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x5240a2
mov eax, dword [eax + 4]
jmp 0x5240a5
add eax, 4
mov edx, dword [esp + 0x24]
push ebx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
cmp dword [esp + 0x1c], 8
jb 0x5240cb
mov eax, dword [esp + 8]
push eax
call fcn.004f6734
add esp, 4
mov al, bl
pop ebx
add esp, 0x1c
ret

Function at 0x5240e0
Capabilities:
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x1c
push 1
push eax
lea ecx, [esp + 8]
push ecx
call fcn.00528ad0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x524102
mov eax, dword [eax + 4]
jmp 0x524105
add eax, 4
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [esp + 0x1c], 8
mov esi, eax
jb 0x524123
mov edx, dword [esp + 8]
push edx
call fcn.004f6734
add esp, 4
cmp esi, 0xffffffff
jne 0x52412f
xor al, al
pop esi
add esp, 0x1c
ret
mov eax, dword [esp + 0x28]
mov dword [eax], esi
mov al, 1
pop esi
add esp, 0x1c
ret

Function at 0x524210
Capabilities:
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x1c
push 1
push eax
lea ecx, [esp + 8]
push ecx
call fcn.00528ad0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x524232
mov eax, dword [eax + 4]
jmp 0x524235
add eax, 4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [esp + 0x1c], 8
mov ebx, eax
jb 0x524253
mov edx, dword [esp + 8]
push edx
call fcn.004f6734
add esp, 4
cmp ebx, 0xffffffff
jne 0x52425f
xor eax, eax
pop ebx
add esp, 0x1c
ret
test bl, 0x10
mov eax, 0
sete al
pop ebx
lea eax, [eax + eax - 1]
add esp, 0x1c
ret

Function at 0x524280
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x1c
push 1
push eax
lea ecx, [esp + 8]
push ecx
call fcn.00528ad0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x5242a2
mov eax, dword [eax + 4]
jmp 0x5242a5
add eax, 4
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
cmp dword [esp + 0x1c], 8
jb 0x5242c8
mov edx, dword [esp + 8]
push edx
call fcn.004f6734
add esp, 4
mov al, bl
pop ebx
add esp, 0x1c
ret
Function at 0x524340
Capabilities:
Get disk size

Disassembly:
push 0xffffffffffffffff
push 0x591646
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0xc4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
mov eax, dword [esp + 0xec]
xor edi, edi
push eax
lea ecx, [esp + 0x4c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call fcn.0051ccc0
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x4c]
mov dword [esp + 0xe8], edi
call fcn.00524320
mov eax, dword [esp + 0x30]
mov ebp, 8
mov byte [esp + 0xe4], 1
cmp dword [esp + 0x44], ebp
jae 0x5243d6
lea eax, [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x24]
push ecx
push eax
call ebx
test eax, eax
jne 0x524498
push 2
push 0xffffffffffffffff
push 0x5aa568
lea ecx, [esp + 0x38]
call fcn.004db0eb
mov esi, eax
cmp esi, 0xffffffff
jne 0x52441a
push eax
push edi
lea ecx, [esp + 0x34]
call fcn.0042e480
push 0xffffffffffffffff
inc esi
push esi
lea ecx, [esp + 0x34]
call fcn.0042e480
push 0x5c
push 1
lea ecx, [esp + 0x34]
call fcn.004db35a
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], ebp
jae 0x524442
lea eax, [esp + 0x30]
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x24]
push edx
push eax
call ebx
test eax, eax
jne 0x524498
cmp dword [esp + 0x44], ebp
jb 0x52446b
mov eax, dword [esp + 0x30]
push eax
call fcn.004f6734
add esp, 4
xor ecx, ecx
mov word [esp + 0x30], cx
lea ecx, [esp + 0x48]
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], edi
mov dword [esp + 0xe4], 0xffffffff
call fcn.00528150
xor eax, eax
xor edx, edx
jmp 0x5244de
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
cmp dword [esp + 0x44], ebp
jb 0x5244b3
mov edx, dword [esp + 0x30]
push edx
call fcn.004f6734
add esp, 4
xor eax, eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], edi
mov word [esp + 0x30], ax
mov dword [esp + 0xe4], 0xffffffff
call fcn.00528150
mov eax, esi
mov edx, ebx
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc4]
xor ecx, esp
call fcn.004f673f
add esp, 0xd4
ret
Function at 0x524510
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x59168b
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0xac], eax
push ebx
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov eax, dword [esp + 0xc8]
push eax
lea ecx, [esp + 0x28]
call fcn.0051ccc0
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x28]
mov dword [esp + 0xc4], 0
call fcn.00524320
cmp dword [eax + 0x18], 8
jb 0x52457d
mov eax, dword [eax + 4]
jmp 0x524580
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
sete bl
cmp dword [esp + 0x20], 8
jb 0x5245a1
mov ecx, dword [esp + 0xc]
push ecx
call fcn.004f6734
add esp, 4
xor edx, edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], 7
mov dword [esp + 0x1c], 0
mov word [esp + 0xc], dx
mov dword [esp + 0xc0], 0xffffffff
call fcn.00528150
mov al, bl
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop ebx
mov ecx, dword [esp + 0xac]
xor ecx, esp
call fcn.004f673f
add esp, 0xbc
ret
Function at 0x524be0
Capabilities:
Move file

Disassembly:
push 0xffffffffffffffff
push 0x591778
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov eax, dword [esp + 0x5c]
push 0
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00528ad0
mov esi, eax
mov edx, dword [esp + 0x64]
push 0
push edx
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x68], 0
call fcn.00528ad0
mov edi, 8
add esp, 0x18
cmp dword [esi + 0x18], edi
jb 0x524c44
mov esi, dword [esi + 4]
jmp 0x524c47
add esi, 4
cmp dword [eax + 0x18], edi
jb 0x524c51
mov eax, dword [eax + 4]
jmp 0x524c54
add eax, 4
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
sete bl
cmp dword [esp + 0x28], edi
jb 0x524c74
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004f6734
add esp, 4
xor edx, edx
mov esi, 7
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], 0
mov word [esp + 0x14], dx
mov dword [esp + 0x50], 0xffffffff
cmp dword [esp + 0x44], edi
jb 0x524ca7
mov eax, dword [esp + 0x30]
push eax
call fcn.004f6734
add esp, 4
xor ecx, ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], 0
mov word [esp + 0x30], cx
test bl, bl
je 0x524ce8
cmp byte [esp + 0x60], cl
je 0x524cd3
mov edx, dword [esp + 0x58]
push edx
push 0xda
call fcn.0051e510
xor al, al
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x44
ret
mov al, 1
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x44
ret
Function at 0x525b70
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x591938
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x61e69c]
xor eax, esp
mov dword [esp + 0xb4], eax
push ebx
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov edi, dword [esp + 0xd8]
mov esi, dword [esp + 0xdc]
xor eax, eax
mov dword [esp + 0x10], eax
xor edx, edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], eax
mov word [esp + 0x1c], dx
mov ebx, 1
mov dword [esp + 0xd0], ebx
test byte [esp + 0xe4], bl
je 0x525bfc
push 0xffffffffffffffff
add ecx, 4
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.0042d910
jmp 0x525c30
mov ax, word [esp + 0xe0]
cmp ax, 0x64
jae 0x525c1a
movzx eax, ax
push eax
push str.z_.2u
lea ecx, [esp + 0x20]
push ecx
jmp 0x525c28
movzx edx, ax
push edx
push 0x5aa6dc
lea eax, [esp + 0x20]
push eax
call fcn.0051e400
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x525c3b
mov esi, dword [esi + 4]
jmp 0x525c3e
add esi, 4
push esi
lea ecx, [esp + 0x38]
call fcn.0051ccc0
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
mov byte [esp + 0xd0], 2
jae 0x525c5f
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x38]
call fcn.0051df90
push edi
lea ecx, [esp + 0x38]
call fcn.0051e050
lea ecx, [esp + 0x34]
mov dword [esp + 0x10], ebx
mov byte [esp + 0xd0], bl
call fcn.00528150
cmp dword [esp + 0x30], 8
jb 0x525c9b
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004f6734
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb4]
xor ecx, esp
call fcn.004f673f
add esp, 0xc4
ret 0x10
Function at 0x528080
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x10]
mov ebx, ecx
test esi, esi
jne 0x528093
pop esi
xor eax, eax
pop ebx
ret 8
push edi
call fcn.004fbc7f
mov dword [eax], 0
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 4]
push esi
push eax
push ecx
call fcn.0050cb98
mov edi, eax
add esp, 0xc
cmp edi, esi
jge 0x5280c8
call fcn.004fbc7f
cmp dword [eax], 0
je 0x5280c8
mov ecx, ebx
call fcn.00527d80
mov eax, edi
pop edi
pop esi
pop ebx
ret 8

Function at 0x529280
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [esi + 4]
call fcn.0052a950
movsx ecx, byte [esp + 0x10]
xor ecx, edi
and ecx, 0xff
mov eax, dword [eax + ecx*4]
shr edi, 8
xor eax, edi
mov edi, dword [esi + 0xc]
movzx ebx, al
add ebx, dword [esi + 8]
mov dword [esi + 4], eax
imul ebx, ebx, 0x8088405
inc ebx
mov dword [esi + 8], ebx
shr ebx, 0x18
call fcn.0052a950
movsx edx, bl
xor edx, edi
shr edi, 8
and edx, 0xff
xor edi, dword [eax + edx*4]
mov dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x5292e0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [esp + 4]
push ebp
push edi
mov edi, ecx
xor ebp, ebp
mov dword [edi + 4], 0x12345678
mov dword [edi + 8], 0x23456789
mov dword [edi + 0xc], 0x34567890
cmp dword [eax + 8], ebp
jbe 0x529369
push ebx
push esi
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 4]
mov bl, byte [edx + ebp]
mov esi, dword [edi + 4]
call fcn.0052a950
movsx ecx, bl
xor ecx, esi
and ecx, 0xff
mov eax, dword [eax + ecx*4]
shr esi, 8
xor eax, esi
mov esi, dword [edi + 0xc]
movzx ebx, al
add ebx, dword [edi + 8]
mov dword [edi + 4], eax
imul ebx, ebx, 0x8088405
inc ebx
mov dword [edi + 8], ebx
shr ebx, 0x18
call fcn.0052a950
movsx edx, bl
xor edx, esi
and edx, 0xff
shr esi, 8
xor esi, dword [eax + edx*4]
mov eax, dword [esp + 0x14]
inc ebp
mov dword [edi + 0xc], esi
cmp ebp, dword [eax + 8]
jb 0x529306
pop esi
pop ebx
pop edi
pop ebp
ret 4
Function at 0x529370
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push 0xffffffffffffffff
push 0x591538
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x30]
push eax
call fcn.005292e0
xor ebp, ebp
push ebp
push 0xc
lea ecx, [esp + 0x1c]
call fcn.00521dc0
mov ecx, dword [esp + 0x18]
push ebp
push 0xc
push ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x34], ebp
call fcn.00527120
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x18]
mov edi, dword [esi + 4]
and eax, 0xfffd
or eax, 2
mov ebx, eax
xor ebx, 1
imul ebx, eax
sar ebx, 8
xor bl, byte [edx + ebp]
call fcn.0052a950
movsx ecx, bl
xor ecx, edi
and ecx, 0xff
mov eax, dword [eax + ecx*4]
shr edi, 8
xor eax, edi
mov edi, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
mov byte [esp + 0x30], al
call fcn.0052a950
movsx edx, byte [esp + 0x30]
xor edx, edi
and edx, 0xff
shr edi, 8
xor edi, dword [eax + edx*4]
inc ebp
cmp ebp, 0xc
mov dword [esi + 0xc], edi
jl 0x5293c6
mov eax, dword [esp + 0x34]
mov cl, byte [eax + 8]
shr cl, 3
test cl, 1
je 0x529450
cmp byte [eax + 0xd], bl
jmp 0x529453
cmp byte [eax + 0x13], bl
lea ecx, [esp + 0x14]
sete bl
mov dword [esp + 0x28], 0xffffffff
call fcn.00521df0
mov al, bl
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
Function at 0x52c480
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esi + 0x2c]
push edi
lea esp, [esp]
mov edi, dword [esi + 0x3c]
sub edi, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub edi, eax
lea edx, [ecx + ebp - 0x106]
mov dword [esp + 0xc], edi
cmp eax, edx
jb 0x52c510
mov eax, dword [esi + 0x38]
push ebp
lea ecx, [eax + ebp]
push ecx
push eax
call fcn.00500790
mov edx, dword [esi + 0x4c]
mov eax, dword [esi + 0x44]
sub dword [esi + 0x70], ebp
sub dword [esi + 0x6c], ebp
add esp, 0xc
sub dword [esi + 0x5c], ebp
lea ecx, [eax + edx*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebp
jb 0x52c4df
sub eax, ebp
jmp 0x52c4e1
xor eax, eax
sub edx, 1
mov word [ecx], ax
jne 0x52c4d0
mov ecx, dword [esi + 0x40]
mov edx, ebp
lea ecx, [ecx + ebp*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebp
jb 0x52c500
sub eax, ebp
jmp 0x52c502
xor eax, eax
sub edx, 1
mov word [ecx], ax
jne 0x52c4f1
add edi, ebp
mov dword [esp + 0xc], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x52c62a
mov eax, dword [esi + 0x74]
add eax, dword [esi + 0x6c]
mov ecx, dword [edi + 4]
add eax, dword [esi + 0x38]
mov edx, dword [esp + 0xc]
mov ebx, ecx
mov dword [esp + 0x10], eax
cmp ebx, edx
jbe 0x52c538
mov ebx, edx
test ebx, ebx
je 0x52c573
mov edx, dword [edi + 0x1c]
sub ecx, ebx
mov dword [edi + 4], ecx
cmp dword [edx + 0x18], 1
jne 0x52c561
mov eax, dword [edi]
mov ecx, dword [edi + 0x30]
push ebx
push eax
push ecx
call fcn.0052e290
mov dword [edi + 0x30], eax
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov edx, dword [edi]
push ebx
push edx
push eax
call fcn.00500790
add dword [edi], ebx
add esp, 0xc
add dword [edi + 8], ebx
add dword [esi + 0x74], ebx
mov ebx, dword [esi + 0x74]
cmp ebx, 3
jb 0x52c59e
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [esi + 0x58]
mov dword [esi + 0x48], eax
movzx edx, byte [edx + 1]
shl eax, cl
xor eax, edx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp ebx, 0x106
jae 0x52c5b2
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x52c490
mov eax, dword [esi + 0x16c0]
mov ecx, dword [esi + 0x3c]
cmp eax, ecx
jae 0x52c62a
mov edi, dword [esi + 0x6c]
add edi, ebx
cmp eax, edi
jae 0x52c5f9
sub ecx, edi
mov ebx, ecx
cmp ebx, 0x102
jbe 0x52c5d9
mov ebx, 0x102
mov ecx, dword [esi + 0x38]
push ebx
add ecx, edi
push 0
push ecx
call fcn.004fe380
add esp, 0xc
add ebx, edi
pop edi
pop ebp
mov dword [esi + 0x16c0], ebx
pop ebx
add esp, 8
ret
lea edx, [edi + 0x102]
cmp eax, edx
jae 0x52c62a
sub edi, eax
add edi, 0x102
sub ecx, eax
cmp edi, ecx
jbe 0x52c613
mov edi, ecx
mov ecx, dword [esi + 0x38]
push edi
add ecx, eax
push 0
push ecx
call fcn.004fe380
add esp, 0xc
add dword [esi + 0x16c0], edi
pop edi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x533a20
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x24
call fcn.00515150
mov eax, dword [0x61e69c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov eax, esi
push edi
mov dword [ebp - 0x18], esi
lea ecx, [eax + 1]
jmp 0x533a50
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x533a50
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
sub eax, ecx
lea edi, [eax + 1]
push edi
push esi
push 8
push 0xfde9
mov dword [ebp - 0x20], 8
call ebx
mov esi, eax
test esi, esi
jg 0x533ac8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3ec
jne 0x533aaa
mov ecx, dword [ebp - 0x18]
push 0
push 0
push edi
push ecx
push 0
push 0xfde9
mov dword [ebp - 0x20], 0
call ebx
mov esi, eax
test esi, esi
jg 0x533ac8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
jne 0x533b5a
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
push edx
push eax
jmp 0x533b48
lea eax, [esi + esi]
call fcn.00503a00
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov eax, esp
push esi
push eax
push edi
push ecx
push edx
push 0xfde9
mov dword [ebp - 0x24], eax
call ebx
test eax, eax
je 0x533b5a
mov esi, dword [ebp - 0x1c]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x533af3
push 8
sub eax, edx
lea ecx, [ebp - 0x14]
push ecx
inc eax
push eax
push esi
push 0
push 0xfde9
call ebx
test eax, eax
je 0x533b5a
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x14]
push edx
push eax
call fcn.004f9299
mov esi, eax
add esp, 8
test esi, esi
jne 0x533bfe
call fcn.004fbc7f
cmp dword [eax], 2
je 0x533b40
call fcn.004fbc7f
cmp dword [eax], 9
jne 0x533b5a
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
push ecx
push edx
call fcn.004fc169
mov esi, eax
add esp, 8
test esi, esi
jne 0x533bfe
push 0xa9
push str..crypto_bio_bss_file.c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push 2
call fcn.00538a20
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push 0x5ae0fc
push eax
push 0x5ae0f8
push ecx
push str.fopen_
push 5
call fcn.00538ce0
add esp, 0x2c
call fcn.004fbc7f
cmp dword [eax], 2
jne 0x533bd0
push 0xac
push str..crypto_bio_bss_file.c
push 0x80
push 0x6d
push 0x20
call fcn.00538a20
add esp, 0x14
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f673f
mov esp, ebp
pop ebp
ret
push 0xae
push str..crypto_bio_bss_file.c
push 2
push 0x6d
push 0x20
call fcn.00538a20
add esp, 0x14
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f673f
mov esp, ebp
pop ebp
ret
push 0x61fa50
call fcn.00532fa0
mov edi, eax
add esp, 4
test edi, edi
jne 0x533c30
push esi
call fcn.004f9951
add esp, 4
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f673f
mov esp, ebp
pop ebp
ret
push 0
push edi
call fcn.005328f0
push esi
push 1
push 0x6a
push edi
call fcn.00532ce0
add esp, 0x18
mov eax, edi
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f673f
mov esp, ebp
pop ebp
ret