Function at 0x10002199
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x10004e71
call fcn.10004b90
push ebx
push esi
push edi
mov esi, ecx
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__access]
pop ecx
test eax, eax
pop ecx
jne 0x10002308
cmp dword [esi], ebx
jne 0x10002308
push 0x10007248
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
cmp eax, ebx
pop ecx
mov dword [esi], eax
je 0x10002308
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push ebx
push eax
call edi
push dword [esi]
call dword [sym.imp.MSVCRT.dll_ftell]
push ebx
push ebx
push dword [esi]
mov dword [ebp + 8], eax
call edi
push dword [esi]
lea eax, [esi + 4]
push 0x64
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x2c
cmp eax, 0x64
je 0x10002224
mov ecx, esi
call fcn.100025be
jmp 0x10002308
mov ax, word [esi + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push dword [esi + 0x1c]
mov edi, dword [sym.imp.WS2_32.dll_ntohl]
mov word [esi + 0x14], ax
call edi
push dword [esi + 0x20]
mov dword [esi + 0x1c], eax
call edi
push dword [esi + 0x24]
mov dword [esi + 0x20], eax
call edi
push dword [esi + 0x28]
mov dword [esi + 0x24], eax
call edi
push dword [esi + 0x30]
mov dword [esi + 0x28], eax
call edi
push dword [esi + 0x34]
mov dword [esi + 0x30], eax
call edi
push dword [esi + 0x38]
mov dword [esi + 0x34], eax
call edi
push dword [esi + 0x3c]
mov dword [esi + 0x38], eax
call edi
push dword [esi + 0x40]
mov dword [esi + 0x3c], eax
call edi
push dword [esi + 0x44]
mov dword [esi + 0x40], eax
call edi
push dword [esi + 0x48]
mov dword [esi + 0x44], eax
call edi
push dword [esi + 0x60]
mov dword [esi + 0x48], eax
call edi
push dword [esi + 0x64]
mov dword [esi + 0x60], eax
call edi
mov dword [esi + 0x64], eax
push 0x10
lea eax, [esi + 4]
push str.SQLite_format_3
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x10002218
movzx eax, word [esi + 0x14]
imul eax, dword [esi + 0x20]
cmp eax, dword [ebp + 8]
ja 0x10002218
mov al, byte [ebp + 0xc]
sub esp, 0x10
mov edi, esp
mov dword [ebp + 8], esp
push ebx
mov ecx, edi
mov byte [edi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, edi
push dword [eax]
lea eax, [ebp + 0xc]
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, esi
call fcn.10002670
cmp al, bl
je 0x10002218
mov bl, 1
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 0xc]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x14