Function at 0x10057a60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x10
push esi
mov esi, ecx
mov al, byte [esi + 0x37]
test al, al
jne 0x10057b01
mov al, byte [esi + 0x30]
test al, al
je 0x10057af7
test byte [esi + 0x2c], 8
je 0x10057af7
mov al, byte [esi + 0x38]
test al, al
jne 0x10057af7
mov al, byte [esi + 0x39]
test al, al
jne 0x10057af7
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x10057ab4
mov ecx, dword [sym.stlport_vc645.dll_unsigned_int__STL::_Filebuf_base::_M_page_size]
xor edx, edx
lea eax, [ecx + 0xfff]
div ecx
imul eax, ecx
push eax
push 0
mov ecx, esi
call sym.stlport_vc645.dll_private:_bool___thiscall__STL::basic_filebuf_unsigned_short_int__class__STL::char_traits_unsigned_short_int__::_M_allocate_buffers_unsigned_short_int___int_
test al, al
je 0x10057af7
mov eax, dword [esi + 0x44]
mov byte [esi + 0x37], 1
mov dword [esi + 0x4c], eax
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x54]
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x58]
push ebx
push ebp
cmp eax, ecx
push edi
mov dword [esi + 0x54], edx
jbe 0x10057b2a
mov dl, byte [esp + 0x13]
mov edi, dword [esi + 0x44]
mov byte [esp + 0x13], dl
lea edx, [esp + 0x13]
push edx
push edi
push eax
push ecx
call fcn.1004f3e0
add esp, 0x10
jmp 0x10057b2d
mov eax, 0xffff
pop esi
add esp, 0x10
ret
mov al, byte [esi + 0x3a]
test al, al
je 0x10057ac7
mov ecx, dword [esi + 0x64]
mov eax, dword [esi + 0x68]
mov dword [esi + 4], ecx
mov ecx, dword [esi + 0x6c]
cmp eax, ecx
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov byte [esi + 0x3a], 0
je 0x10057ac7
mov ax, word [eax]
pop esi
add esp, 0x10
ret
mov eax, dword [esi + 0x44]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x48]
sub ecx, eax
push ecx
push eax
lea ecx, [esi + 0x24]
call sym.stlport_vc645.dll_public:_int___thiscall__STL::_Filebuf_base::_M_read_char___int_
test eax, eax
jle 0x10057c14
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x40]
mov edi, dword [esi + 0x3c]
lea ebp, [esp + 0x18]
push ebp
add ecx, eax
push edx
lea edx, [esp + 0x24]
mov dword [esi + 0x50], ecx
mov eax, ecx
mov ecx, dword [esi + 0x58]
push edi
push edx
push eax
mov eax, dword [esi + 0x44]
mov dword [esp + 0x28], ecx
mov ecx, dword [esi + 0x70]
push eax
lea eax, [esp + 0x2c]
mov ebx, dword [ecx]
push eax
call dword [ebx + 8]
cmp eax, 3
je 0x10057bd4
cmp eax, 2
je 0x10057bf8
mov eax, dword [esi + 0x3c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
cmp ecx, eax
je 0x10057b9d
cmp edx, dword [esi + 0x44]
je 0x10057bf8
mov bl, byte [esi + 0x34]
test bl, bl
je 0x10057bb9
mov edi, ecx
mov ebp, dword [esi + 0x44]
sub edi, eax
mov ebx, edx
sar edi, 1
imul edi, dword [esi + 0x74]
sub ebx, ebp
cmp edi, ebx
jne 0x10057bf8
cmp ecx, eax
jne 0x10057bde
mov ebp, dword [esi + 0x44]
mov ebx, dword [esi + 0x78]
mov edi, edx
sub edi, ebp
cmp edi, ebx
jge 0x10057bf8
cmp ecx, eax
jne 0x10057bde
jmp 0x10057b30
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, dword [esi + 0x3c]
pop edi
pop ebp
mov dword [esi + 0x4c], edx
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov ax, word [eax]
pop ebx
pop esi
add esp, 0x10
ret
mov ecx, esi
call sym.stlport_vc645.dll_private:_void___thiscall__STL::basic_filebuf_unsigned_short_int__class__STL::char_traits_unsigned_short_int__::_M_exit_input_mode_void_
push 0
push 0
push 0
mov ecx, esi
mov byte [esi + 0x38], 0
mov byte [esi + 0x39], 1
call sym.stlport_vc645.dll_public:_void___thiscall__STL::basic_streambuf_unsigned_short_int__class__STL::char_traits_unsigned_short_int__::_M_setg_unsigned_short_int___unsigned_short_int___unsigned_short_int__
pop edi
pop ebp
pop ebx
mov eax, 0xffff
pop esi
add esp, 0x10
ret