Function at 0x10001020
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2b24
call fcn.10007610
push esi
push edi
push 0x1400
lea eax, [ebp - 0x2b24]
mov byte [0x1000a410], 1
push 0
push eax
mov esi, edx
mov edi, ecx
call sub.VCRUNTIME140.dll_memset
push 0x1400
lea eax, [ebp - 0x1724]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x200
lea eax, [ebp - 0x324]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x18], 0
call sub.VCRUNTIME140.dll_memset
push 0xff
lea eax, [ebp - 0x124]
mov byte [ebp - 0x14], 0
push 0
push eax
mov dword [ebp - 0x13], 0
call sub.VCRUNTIME140.dll_memset
push esi
push edi
lea eax, [ebp - 0x124]
push str._szoo_d.bin
push eax
call fcn.10001840
add esp, 0x40
lea eax, [ebp - 0x124]
push 0x100081d4
push eax
lea eax, [ebp - 8]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 8]
add esp, 0xc
test eax, eax
jne 0x100010e0
pop edi
mov eax, 4
pop esi
mov esp, ebp
pop ebp
ret
push ebx
push 2
push 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push dword [ebp - 8]
mov ebx, eax
mov dword [ebp - 0xc], ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
push ebx
call fcn.100067e2
push dword [ebp - 8]
mov edi, eax
push ebx
push 1
push edi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push dword [ebp - 8]
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x2c
mov dword [ebp - 8], 0
cmp esi, ebx
je 0x10001149
push edi
call fcn.100067eb
add esp, 4
mov eax, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.device.dll_public:_void___thiscall_device::set_target_command_char_const___char_const__]
mov ecx, 0x1000a420
push 0x100081d8
push 0x100081dc
call esi
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
push str.0004000000
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___unsigned_char__]
mov edi, dword [sym.imp.device.dll_public:_bool___thiscall_device::request_unsigned_char___unsigned_short_int__unsigned_char___unsigned_short_int___int_]
lea ecx, [ebp - 4]
push 0x7530
push ecx
lea ecx, [ebp - 0x1724]
movzx eax, ax
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call edi
test al, al
jne 0x100011ad
mov esi, 0x49e
jmp 0x10001584
mov ebx, dword [sym.imp.device.dll_public:_int___thiscall_device::unpack_unsigned_char___unsigned_short_int__]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1724]
mov ecx, 0x1000a420
push eax
call ebx
test eax, eax
je 0x100011d3
mov esi, 0x49e
jmp 0x10001584
mov eax, dword [ebp - 0x1724]
cmp al, 0x62
jne 0x100011ef
cmp ah, 0x6f
jne 0x100011ef
cmp byte [ebp - 0x1722], 0x74
je 0x10001305
push 0x100081ec
push 0x100081dc
mov ecx, 0x1000a420
call esi
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
push str.6406000000
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___unsigned_char__]
push 0x7530
lea ecx, [ebp - 4]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x1724]
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call edi
test al, al
jne 0x10001247
mov esi, 0x4a5
jmp 0x10001584
lea eax, [ebp - 4]
mov ecx, 0x1000a420
push eax
lea eax, [ebp - 0x1724]
push eax
call ebx
test eax, eax
je 0x10001269
pop ebx
pop edi
mov eax, 0x4a5
pop esi
mov esp, ebp
pop ebp
ret
push 0x100081d8
push 0x100081dc
mov ecx, 0x1000a420
call esi
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
push str.0004000000
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___unsigned_char__]
push 0x7530
lea ecx, [ebp - 4]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x1724]
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call edi
test al, al
jne 0x100012c1
mov esi, 0x49e
jmp 0x10001584
lea eax, [ebp - 4]
mov ecx, 0x1000a420
push eax
lea eax, [ebp - 0x1724]
push eax
call ebx
test eax, eax
je 0x100012e1
mov esi, 0x49e
jmp 0x10001584
mov eax, dword [ebp - 0x1724]
cmp al, 0x62
jne 0x10001578
cmp ah, 0x6f
jne 0x10001578
cmp byte [ebp - 0x1722], 0x74
jne 0x10001578
push 0x100081fc
push 0x100081dc
mov ecx, 0x1000a420
call esi
mov esi, dword [ebp - 0xc]
lea eax, [ebp - 0x2b24]
push eax
push 5
lea eax, [ebp - 0x14]
mov dword [ebp - 0x13], esi
push eax
mov ecx, 0x1000a420
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___int__unsigned_char__]
push 0x7530
lea ecx, [ebp - 4]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x1724]
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call edi
test al, al
jne 0x10001364
mov esi, 0x49f
jmp 0x10001584
lea eax, [ebp - 4]
mov ecx, 0x1000a420
push eax
lea eax, [ebp - 0x1724]
push eax
call ebx
test eax, eax
je 0x10001384
mov esi, 0x49f
jmp 0x10001584
push 0x10008200
push 0x100081dc
mov ecx, 0x1000a420
call dword [sym.imp.device.dll_public:_void___thiscall_device::set_target_command_char_const___char_const__]
xor edx, edx
mov eax, esi
mov ecx, 0x100
div ecx
test edx, edx
mov dword [ebp - 0x24], edx
lea ecx, [eax + 1]
cmove ecx, eax
xor esi, esi
mov dword [ebp - 0xc], ecx
test ecx, ecx
je 0x1000146c
dec ecx
xor eax, eax
mov dword [ebp - 0x20], ecx
cmp esi, ecx
mov byte [ebp - 0x324], 1
mov edi, 0x100
cmove edi, edx
add eax, dword [ebp - 0x1c]
push edi
push eax
lea eax, [ebp - 0x31f]
mov dword [ebp - 0x323], edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
lea eax, [edi + 5]
push eax
lea eax, [ebp - 0x324]
push eax
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___int__unsigned_char__]
push 0x7530
lea ecx, [ebp - 4]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x1724]
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call dword [sym.imp.device.dll_public:_bool___thiscall_device::request_unsigned_char___unsigned_short_int__unsigned_char___unsigned_short_int___int_]
test al, al
je 0x100014ca
lea eax, [ebp - 4]
mov ecx, 0x1000a420
push eax
lea eax, [ebp - 0x1724]
push eax
call ebx
test eax, eax
jne 0x100014ca
mov eax, dword [ebp - 0x18]
inc esi
mov ecx, dword [ebp - 0x20]
add eax, edi
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
cmp esi, dword [ebp - 0xc]
jb 0x100013c2
mov edi, dword [sym.imp.device.dll_public:_bool___thiscall_device::request_unsigned_char___unsigned_short_int__unsigned_char___unsigned_short_int___int_]
mov esi, dword [sym.imp.device.dll_public:_void___thiscall_device::set_target_command_char_const___char_const__]
mov ecx, 0x1000a420
push 0x10008204
push 0x100081dc
call esi
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
push str.0206000000
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___unsigned_char__]
push 0x7530
lea ecx, [ebp - 4]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x1724]
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call edi
test al, al
jne 0x100014d4
mov esi, 0x4a1
jmp 0x10001584
mov esi, 0x4a0
jmp 0x10001584
lea eax, [ebp - 4]
mov ecx, 0x1000a420
push eax
lea eax, [ebp - 0x1724]
push eax
call ebx
test eax, eax
je 0x100014f4
mov esi, 0x4a1
jmp 0x10001584
push 0x10008214
mov ecx, 0x1000a420
call dword [sym.imp.device.dll_public:_void___thiscall_device::set_package_format_char_const__]
push 0x100081d8
push 0x100081dc
mov ecx, 0x1000a420
call esi
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
push str.0004000000
call dword [sym.imp.device.dll_public:_int___thiscall_device::packet_char_const___unsigned_char__]
push 0x7530
lea ecx, [ebp - 4]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x1724]
push ecx
push eax
lea eax, [ebp - 0x2b24]
mov ecx, 0x1000a420
push eax
call edi
test al, al
jne 0x10001559
mov esi, 0x4a2
jmp 0x10001584
lea eax, [ebp - 4]
mov ecx, 0x1000a420
push eax
lea eax, [ebp - 0x1724]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x10001584
mov esi, 0x4a2
jmp 0x10001584
mov byte [0x1000a410], 0
mov esi, 0xb
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10001594
push eax
call fcn.100067eb
add esp, 4
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret