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

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov al, byte [esi + 0x37]
test al, al
jne 0x10058fa2
mov al, byte [esi + 0x30]
test al, al
je 0x10058f99
test byte [esi + 0x2c], 8
je 0x10058f99
mov al, byte [esi + 0x38]
test al, al
jne 0x10058f99
mov al, byte [esi + 0x39]
test al, al
jne 0x10058f99
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x10058f56
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 0x10058f99
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 0x10058fcb
mov dl, byte [esp + 0x20]
mov edi, dword [esi + 0x44]
mov byte [esp + 0x20], dl
lea edx, [esp + 0x20]
push edx
push edi
push eax
push ecx
call fcn.1004f3e0
add esp, 0x10
jmp 0x10058fce
or ax, 0xffff
pop esi
add esp, 0xc
ret
mov al, byte [esi + 0x3a]
test al, al
je 0x10058f69
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 0x10058f69
mov ax, word [eax]
pop esi
add esp, 0xc
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 0x100590c6
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x40]
mov edi, dword [esi + 0x3c]
lea ebp, [esp + 0x14]
push ebp
add ecx, eax
push edx
lea edx, [esp + 0x20]
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 + 0x24], ecx
mov ecx, dword [esi + 0x70]
push eax
lea eax, [esp + 0x28]
mov ebx, dword [ecx]
push eax
call dword [ebx + 8]
cmp eax, 3
je 0x10059075
cmp eax, 2
je 0x10059099
mov eax, dword [esi + 0x3c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
cmp ecx, eax
je 0x1005903e
cmp edx, dword [esi + 0x44]
je 0x10059099
mov bl, byte [esi + 0x34]
test bl, bl
je 0x1005905a
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 0x10059099
cmp ecx, eax
jne 0x1005907f
mov ebp, dword [esi + 0x44]
mov ebx, dword [esi + 0x78]
mov edi, edx
sub edi, ebp
cmp edi, ebx
jge 0x10059099
cmp ecx, eax
jne 0x1005907f
jmp 0x10058fd1
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0xc
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, 0xc
ret
mov eax, dword [esi + 0x5c]
xor ebx, ebx
cmp eax, ebx
je 0x100590af
mov ecx, dword [esi + 0x60]
push ecx
push eax
lea ecx, [esi + 0x24]
call sym.stlport_vc645.dll_public:_void___thiscall__STL::_Filebuf_base::_M_unmap_void___long_int_
push ebx
push ebx
push ebx
mov ecx, esi
mov byte [esi + 0x37], bl
mov dword [esi + 0x5c], ebx
mov byte [esi + 0x38], bl
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, 0xc
ret