joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49da80
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x508
push ebx
push ebp
push esi
push edi
xor edi, edi
mov ebp, ecx
cmp eax, edi
je 0x49db93
push edi
push eax
mov eax, dword [0x659a18]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x659a18]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ecx
push 1
push 4
push ebp
call ebx
mov edx, dword [0x659a18]
lea eax, [ebp + 4]
push edx
push 1
push 4
push eax
call ebx
mov ecx, dword [0x659a18]
lea esi, [ebp + 8]
push ecx
push 1
push 4
push esi
call ebx
mov edx, dword [0x659a18]
lea eax, [esp + 0x50]
push edx
push 1
push 4
push eax
mov dword [esp + 0x60], edi
call ebx
add esp, 0x4c
mov ecx, ebp
call fcn.0049e630
test eax, eax
je 0x49db91
mov edx, dword [0x659a18]
mov dword [esp + 0x18], edi
mov ecx, 0x13f
xor eax, eax
lea edi, [esp + 0x1c]
push eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [0x659a18]
mov ecx, dword [esi]
push eax
push ecx
lea edx, [esp + 0x2c]
push 4
push edx
call ebx
mov eax, dword [esi]
add esp, 0x1c
xor edi, edi
test eax, eax
jle 0x49db73
lea eax, [ebp + 0xc]
lea ebx, [esp + 0x18]
mov dword [esp + 0x10], eax
mov ecx, dword [ebx]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.0049d8c0
mov ecx, dword [esp + 0x10]
mov eax, dword [esi]
inc edi
add ebx, 4
add ecx, 0x1c
cmp edi, eax
mov dword [esp + 0x10], ecx
jl 0x49db52
mov eax, 0xfff0bdc1
pop edi
mov dword [ebp + 0x390], eax
mov dword [ebp + 0x394], eax
pop esi
pop ebp
pop ebx
add esp, 0x508
ret 4
mov dword [esi], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x508
ret 4
Function at 0x49e350
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
call fcn.0049e630
test eax, eax
je 0x49e3b8
mov eax, dword [str.stage.cfg]
push 0x56c118
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x49e3b8
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
push esi
lea edi, [ebx + 8]
push 1
push 4
push edi
call ebp
mov edi, dword [edi]
push esi
push 1
add ebx, 0xc
lea ecx, [edi*8]
sub ecx, edi
shl ecx, 2
push ecx
push ebx
call ebp
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x24
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebx
ret

Function at 0x49e3c0
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
call fcn.0049e630
test eax, eax
je 0x49e41e
mov eax, dword [str.stage.cfg]
push 0x56c990
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x49e41e
mov ecx, dword [edi + 8]
lea eax, [edi + 8]
push esi
push 1
lea edx, [ecx*8]
sub edx, ecx
lea ecx, [edx*4 + 4]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebx
ret
pop edi
mov eax, ebx
pop esi
pop ebx
ret

Function at 0x49e7b0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0x56c254
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x49e7e7
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push esi
push 1
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
pop esi
ret

Function at 0x49e7f0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push edi
test eax, eax
mov esi, ecx
je 0x49e882
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push eax
mov eax, dword [0x659a18]
push eax
call edi
mov ecx, dword [0x659a18]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ecx
push 1
push 0x2c
push esi
call ebx
mov eax, dword [esi + 0x24]
add esp, 0x1c
test eax, eax
jle 0x49e882
mov eax, dword [esi + 0x28]
test eax, eax
je 0x49e882
mov edx, dword [0x659a18]
push 0
push eax
push edx
call edi
mov eax, dword [esi + 0x24]
add esp, 0xc
mov ecx, 0x6af5d8
push eax
call fcn.004a7db0
mov ecx, dword [0x659a18]
mov edx, dword [esi + 0x24]
push ecx
mov edi, eax
push 1
push edx
push edi
call ebx
mov eax, dword [esi + 0x24]
add esi, 4
push eax
push edi
push esi
call fcn.0049e7b0
add esp, 0x1c
mov ecx, 0x6af5d8
push edi
call fcn.004a7de0
pop edi
pop esi
pop ebx
ret 4
Function at 0x49e890
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x4000
call fcn.0051c710
mov eax, dword [esp + 0x4004]
push ebx
push esi
push edi
test eax, eax
mov esi, ecx
je 0x49e947
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push eax
mov eax, dword [0x659a18]
push eax
call edi
mov ecx, dword [0x659a18]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ecx
push 1
push 0xc
push esi
call ebx
mov eax, dword [esi + 4]
add esp, 0x1c
test eax, eax
jle 0x49e947
mov eax, dword [esi + 8]
test eax, eax
je 0x49e947
mov edx, dword [0x659a18]
push 0
push eax
push edx
call edi
mov eax, dword [0x659a18]
mov ecx, dword [esi + 4]
push eax
push ecx
lea edx, [esp + 0x20]
push 4
push edx
call ebx
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
shl edx, 2
push edx
call sub.MFC42u.DLL_operatornew
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
add esp, 0x20
xor edi, edi
test eax, eax
jle 0x49e947
push ebp
xor ebp, ebp
lea ebx, [esp + 0x10]
mov eax, dword [ebx]
mov ecx, dword [esi + 8]
push eax
add ecx, ebp
call fcn.0049e7f0
mov eax, dword [esi + 4]
inc edi
add ebx, 4
add ebp, 0x2c
cmp edi, eax
jl 0x49e92b
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4000
ret 4

Function at 0x49e970
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push esi
test eax, eax
mov esi, ecx
je 0x49e99f
push 0
push eax
mov eax, dword [0x659a18]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x659a18]
push ecx
push 1
push 0x10
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
pop esi
ret 4
Function at 0x49ef20
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x402c
call fcn.0051c710
mov eax, dword [esp + 0x4030]
push ebx
push ebp
push esi
test eax, eax
push edi
mov esi, ecx
je 0x49f0c8
push 0
push eax
mov eax, dword [0x659a18]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x659a18]
push ecx
push 1
push 0x124
push esi
call dword [sym.imp.MSVCRT.dll_fread]
lea edx, [esi + 0xd0]
mov ecx, 0xa
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, 0xa
or eax, 0xffffffff
lea edi, [esi + 0xf8]
add esp, 0x1c
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x28]
mov dword [esi + 0x120], 0
test eax, eax
jle 0x49f0c8
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x49f0c8
mov eax, dword [esi]
mov dword [esp + 0x2c], 1
mov ecx, eax
lea ebx, [esp + 0x14]
and ecx, 7
mov ebp, edx
mov dword [esp + 0x14], ecx
mov ecx, eax
shr ecx, 4
and ecx, 7
lea edi, [esi + 0x30]
mov dword [esp + 0x18], ecx
mov ecx, eax
shr ecx, 8
and ecx, 7
mov dword [esp + 0x10], 0xa
mov dword [esp + 0x1c], ecx
mov ecx, eax
shr ecx, 0xc
and ecx, 7
mov dword [esp + 0x20], ecx
mov ecx, eax
shr ecx, 0x10
and ecx, 7
mov dword [esp + 0x24], ecx
mov ecx, eax
shr ecx, 0x14
and ecx, 7
mov dword [esp + 0x28], ecx
mov ecx, eax
shr ecx, 0x18
and ecx, 7
mov dword [esp + 0x30], ecx
mov ecx, eax
and ecx, 0x80
and eax, 0x800
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
cmp dword [ebx], 0
je 0x49f04c
push 0x24
call fcn.00470250
add esp, 4
test eax, eax
je 0x49f047
push 1
push edi
mov ecx, eax
call fcn.00489020
jmp 0x49f049
xor eax, eax
mov dword [ebp], eax
mov eax, dword [esp + 0x10]
add edi, 0x10
add ebx, 4
add ebp, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x49f028
mov edx, dword [esi + 0x2c]
mov eax, dword [0x659a18]
push 0
push edx
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x659a18]
mov edx, dword [esi + 0x28]
push ecx
push edx
lea eax, [esp + 0x50]
push 4
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esi + 0x28]
shl ecx, 4
push ecx
call sub.MFC42u.DLL_operatornew
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x28]
add esp, 0x20
xor edi, edi
test eax, eax
jle 0x49f0c8
xor ebp, ebp
lea ebx, [esp + 0x3c]
mov edx, dword [ebx]
mov ecx, ebp
push edx
mov edx, dword [esi + 0x2c]
add ecx, edx
call fcn.0049e970
mov eax, dword [esi + 0x28]
inc edi
add ebx, 4
add ebp, 0x10
cmp edi, eax
jl 0x49f0ab
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x402c
ret 4

Function at 0x49f140
Capabilities:
Create directory

Disassembly:
sub esp, 0x100
push esi
mov edx, ecx
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
add edx, 4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x53e850]
push edx
push eax
lea ecx, [esp + 0x10]
push str.rcp_s_s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov esi, dword [esp + 0x11c]
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
lea edx, [esp + 0x18]
push esi
push edx
call edi
add esp, 0x18
test eax, eax
jne 0x49f1b1
cmp byte [esi], 0x72
je 0x49f1b1
push eax
push 0x56f05c
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 8]
push esi
push eax
call edi
add esp, 8
pop edi
pop esi
add esp, 0x100
ret 4
Function at 0x49f260
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x200c
call fcn.0051c710
push ebp
push edi
mov edi, ecx
push 0x56c118
mov dword [esp + 0x14], edi
call fcn.0049f140
mov ebp, eax
test ebp, ebp
mov dword [esp + 8], ebp
je 0x49f439
push ebx
push esi
mov esi, dword [esp + 0x2020]
xor eax, eax
mov ecx, 3
xor ebx, ebx
mov ah, byte [esi + 2]
mov al, byte [esi + 5]
cdq
idiv ecx
cmp edx, 1
jne 0x49f2d2
mov edx, dword [edi + 0x28]
mov ebx, dword [edi + 0x110]
xor ecx, ecx
test edx, edx
jle 0x49f2cd
mov eax, dword [edi + 0x2c]
mov edi, edx
add eax, 5
xor edx, edx
mov dl, byte [eax]
add eax, 0x10
add ecx, edx
dec edi
jne 0x49f2c1
imul ecx, ebx
mov ebx, ecx
mov ecx, esi
call fcn.004b53f0
mov edi, dword [esp + 0x2024]
mov ecx, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov al, byte [esi + 4]
test al, al
jne 0x49f3fd
mov edi, dword [esi + 8]
push 0
shr edi, 3
lea eax, [edi + ebx]
push eax
push ebp
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, esi
call fcn.004b5410
mov ebp, eax
mov eax, dword [esi + 8]
mov ecx, 0x7ff
mov byte [esp + 0x1c], 0
lea ebx, [eax + ebp - 1]
xor eax, eax
shr ebx, 3
sub ebx, edi
lea edi, [esp + 0x1d]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
inc ebx
stosw word es:[edi], ax
push ecx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esp + 0x18]
add esp, 4
cmp eax, ecx
jne 0x49f3dd
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
push ebx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, dword [esi + 8]
add esp, 0x10
and esi, 7
xor ecx, ecx
test ebp, ebp
jle 0x49f3dd
mov edi, esi
and edi, 0x80000007
jns 0x49f38d
dec edi
or edi, 0xfffffff8
inc edi
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dl, byte [esp + eax + 0x1c]
mov al, byte [edi*4 + 0x659a34]
test dl, al
je 0x49f3d7
mov eax, ecx
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x2024]
sar eax, 3
add eax, edx
mov edx, ecx
and edx, 0x80000007
jns 0x49f3ca
dec edx
or edx, 0xfffffff8
inc edx
mov dl, byte [edx*4 + 0x659a34]
mov bl, byte [eax]
or bl, dl
mov byte [eax], bl
inc esi
inc ecx
cmp ecx, ebp
jl 0x49f37e
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push ebp
call fcn.0049f1c0
pop esi
pop ebx
pop edi
mov eax, 1
pop ebp
add esp, 0x200c
ret 8
mov eax, dword [esi + 8]
push 0
lea edi, [ebx + eax*2]
push edi
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push ebp
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
cmp eax, edi
jne 0x49f3e1
push ebp
mov ecx, esi
call fcn.004b53f0
mov ecx, dword [esp + 0x2028]
push eax
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
jmp 0x49f3e1
mov ecx, dword [esp + 0x2018]
call fcn.004b53f0
mov edi, dword [esp + 0x201c]
mov ecx, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
pop edi
mov eax, 1
pop ebp
add esp, 0x200c
ret 8
Function at 0x49ffd0
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x4000
call fcn.0051c710
mov eax, dword [esp + 0x4004]
push ebx
push ebp
push esi
test eax, eax
push edi
mov esi, ecx
je 0x4a0098
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push eax
mov eax, dword [0x659a18]
push eax
call ebx
mov ecx, dword [0x659a18]
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
push ecx
push 1
push 0x58c
push esi
call ebp
mov ecx, 0x160
xor eax, eax
lea edi, [esi + 0xc]
add esp, 0x1c
rep stosd dword es:[edi], eax
mov eax, dword [esi + 4]
test eax, eax
jle 0x4a0098
mov eax, dword [esi + 8]
test eax, eax
je 0x4a0098
mov edx, dword [0x659a18]
push 0
push eax
push edx
call ebx
mov eax, dword [0x659a18]
mov ecx, dword [esi + 4]
push eax
push ecx
lea edx, [esp + 0x24]
push 4
push edx
call ebp
mov eax, dword [esi + 4]
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*8]
shl edx, 2
push edx
call sub.MFC42u.DLL_operatornew
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
add esp, 0x20
xor edi, edi
test eax, eax
jle 0x4a0098
xor ebp, ebp
lea ebx, [esp + 0x10]
mov eax, dword [ebx]
mov ecx, dword [esi + 8]
push eax
add ecx, ebp
call fcn.0049ef20
mov eax, dword [esi + 4]
inc edi
add ebx, 4
add ebp, 0x124
cmp edi, eax
jl 0x4a007a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4000
ret 4

Function at 0x4a7860
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
ret

Function at 0x4a9bb0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebp
push esi
xor esi, esi
push edi
mov ebp, ecx
mov dword [esp + 0xc], esi
call fcn.004a9b40
mov edi, eax
test edi, edi
je 0x4a9c66
push ebx
push 2
push esi
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
push edi
call dword [sym.imp.MSVCRT.dll_ftell]
mov esi, eax
push esi
call fcn.00470b90
push 0
push 0
push edi
mov ebx, eax
call dword [sym.imp.MSVCRT.dll_fseek]
push edi
push esi
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x34
mov ecx, ebp
push esi
call fcn.004a9910
test eax, eax
je 0x4a9c50
push esi
push ebx
mov ecx, ebp
call fcn.004a99b0
test eax, eax
je 0x4a9c50
xor edi, edi
xor eax, eax
test esi, esi
jle 0x4a9c34
xor ecx, ecx
mov cl, byte [eax + ebx]
add edi, ecx
inc eax
cmp eax, esi
jl 0x4a9c28
push edi
mov ecx, ebp
call fcn.004a9ac0
push esi
push ebx
mov edi, eax
call fcn.00470be0
add esp, 8
mov eax, edi
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret
mov edi, dword [esp + 0x10]
push esi
push ebx
call fcn.00470be0
add esp, 8
mov eax, edi
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret
mov eax, esi
pop edi
pop esi
pop ebp
pop ecx
ret
Function at 0x4aa4b0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x53197b
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
push esi
push edi
test eax, eax
mov esi, ecx
je 0x4aa53b
push 0
push eax
mov eax, dword [0x659a18]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x659a18]
push ecx
push 1
push 0x14
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov edi, dword [esi + 8]
add esp, 0x1c
test edi, edi
je 0x4aa534
push 0x1c
call sub.MFC42u.DLL_operatornew
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], 0
je 0x4aa51f
mov ecx, eax
call fcn.004399d0
jmp 0x4aa521
xor eax, eax
push edi
mov ecx, eax
mov dword [esp + 0x14], 0xffffffff
mov dword [esi + 8], eax
call fcn.00439a00
mov dword [esi + 0x10], 0
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0xc
ret 4

Function at 0x4aa7b0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebx
xor ebx, ebx
push esi
cmp eax, ebx
mov esi, ecx
je 0x4aa822
push edi
push ebx
push eax
mov eax, dword [0x659a18]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x659a18]
push ecx
push 1
push 0x10c
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x30]
add esp, 0x1c
mov dword [esi + 0x68], ebx
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x74], ebx
mov dword [esi + 0x100], ebx
mov dword [esi + 0x104], ebx
mov dword [esi + 0xf8], ebx
mov dword [esi + 0x108], edx
mov ecx, 0x20
xor eax, eax
lea edi, [esi + 0x78]
add esi, 0xfc
rep stosd dword es:[edi], eax
mov dword [esi], ebx
pop edi
pop esi
pop ebx
ret 8

Function at 0x4ab4f0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x659a18]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push eax
push ecx
call edi
mov edx, dword [0x659a18]
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
push edx
push 1
push 0x10
push esi
call ebp
mov eax, dword [esi + 8]
add esp, 0x1c
test eax, eax
je 0x4ab570
cmp word [esi + 6], 0
jbe 0x4ab570
push 0
push eax
mov eax, dword [0x659a18]
push eax
call edi
xor ecx, ecx
mov cx, word [esi + 6]
inc ecx
push ecx
call fcn.00470b90
mov dword [esi + 8], eax
mov edx, dword [0x659a18]
xor ecx, ecx
push edx
mov cx, word [esi + 6]
push ecx
push 1
push eax
call ebp
mov eax, dword [esi + 8]
add esp, 0x20
xor edx, edx
mov dx, word [esi + 6]
mov byte [edx + eax], 0
jmp 0x4ab577
mov dword [esi + 8], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4ab5cc
cmp word [esi + 4], 0
jbe 0x4ab5cc
mov ecx, dword [0x659a18]
push 0
push eax
push ecx
call edi
xor edx, edx
mov dx, word [esi + 4]
inc edx
push edx
call fcn.00470b90
mov dword [esi + 0xc], eax
mov ecx, dword [0x659a18]
xor edx, edx
push ecx
mov dx, word [esi + 4]
push edx
push 1
push eax
call ebp
mov ecx, dword [esi + 0xc]
add esp, 0x20
xor eax, eax
mov ax, word [esi + 4]
pop edi
mov byte [eax + ecx], 0
mov eax, esi
pop esi
pop ebp
ret 4
mov dword [esi + 0xc], 0
mov eax, esi
pop edi
pop esi
pop ebp
ret 4
Function at 0x4ab8c0
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2404
call fcn.0051c710
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov ecx, 0x7ff
xor eax, eax
lea edi, [esp + 0x415]
mov byte [esp + 0x414], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x18]
mov dword [esp + 0x14], ebx
push 0x56c118
push str.mqtt.cfg
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x4ab977
push eax
push 0x2000
lea eax, [esp + 0x41c]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ebp, dword [sym.imp.MSVCRT.dll_strchr]
add esp, 0x10
lea edi, [esp + 0x414]
push 0xa
push edi
call ebp
add esp, 8
cmp eax, ebx
je 0x4ab969
cmp byte [eax], bl
je 0x4ab969
mov byte [eax], bl
mov ecx, dword [esi + 4]
lea edx, [esp + 0x414]
sub edi, edx
mov dword [esp + ecx*4 + 0x14], edi
inc ecx
mov dword [esi + 4], ecx
lea edi, [eax + 1]
jmp 0x4ab93e
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ecx, dword [esi + 4]
cmp ecx, ebx
jle 0x4ab9f7
lea eax, [ecx*8]
sub eax, ecx
lea edx, [eax + eax*2]
lea eax, [ecx + edx*2]
shl eax, 3
push eax
call fcn.00470b90
mov ecx, dword [esi + 4]
mov edi, eax
mov dword [esi + 8], edi
add esp, 4
lea eax, [ecx*8]
sub eax, ecx
lea edx, [eax + eax*2]
xor eax, eax
lea ecx, [ecx + edx*2]
shl ecx, 3
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 4]
xor edi, edi
cmp eax, ebx
jle 0x4ab9f7
xor ebp, ebp
lea ebx, [esp + 0x14]
mov eax, dword [ebx]
lea ecx, [esp + eax + 0x414]
push ecx
mov ecx, dword [esi + 8]
add ecx, ebp
call fcn.004ab5e0
mov eax, dword [esi + 4]
inc edi
add ebx, 4
add ebp, 0x158
cmp edi, eax
jl 0x4ab9d2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2404
ret

Function at 0x4aba10
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x100
push ebx
xor ebx, ebx
push esi
cmp eax, 1
push edi
jne 0x4abab5
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x118]
mov edx, dword [esp + 0x114]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x11c]
push eax
push ecx
push edx
lea eax, [esp + 0x18]
push str._d__s__s_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0x56f284
push str.mqtt.cfg
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x1c
cmp esi, ebx
je 0x4abab5
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x14]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x100
ret 0x10
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x100
ret 0x10
Function at 0x4abc40
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x20
push esi
mov esi, ecx
mov ecx, dword [0x659a18]
push edi
push 0
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [0x659a18]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push edx
push 4
push 1
push esi
call edi
mov eax, dword [0x659a18]
lea ecx, [esp + 0x24]
push eax
push 0x20
push 1
push ecx
call edi
push 0x24
call fcn.00470250
add esp, 0x30
test eax, eax
je 0x4abc9e
lea edx, [esp + 8]
push 1
push edx
mov ecx, eax
call fcn.00489020
jmp 0x4abca0
xor eax, eax
push 0x24
mov dword [esi + 4], eax
call fcn.00470250
add esp, 4
test eax, eax
je 0x4abccc
lea ecx, [esp + 0x18]
push 1
push ecx
mov ecx, eax
call fcn.00489020
mov dword [esi + 8], eax
mov eax, esi
pop edi
pop esi
add esp, 0x20
ret 4
xor eax, eax
pop edi
mov dword [esi + 8], eax
mov eax, esi
pop esi
add esp, 0x20
ret 4

Function at 0x4abdf0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, ecx
mov ecx, dword [0x659a18]
push edi
push 0
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [0x659a18]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push edx
push 4
push 1
push esi
call ebx
mov eax, dword [0x659a18]
lea edi, [esi + 4]
push eax
push 0x20
push 1
push edi
call ebx
add esp, 0x2c
mov ecx, edi
call fcn.004b53f0
push eax
call fcn.00470b90
add esp, 4
mov dword [esi + 0x24], eax
mov eax, esi
pop edi
pop esi
pop ebx
ret 4

Function at 0x4abea0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, ecx
push 0
mov ecx, dword [0x659a18]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [0x659a18]
push edx
push 1
push 0x10
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov eax, esi
pop esi
ret 4