Function at 0x10059be0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
push esi
mov esi, ecx
mov ecx, dword [esi + 0xb8]
push edi
lea edi, [esi + 0xb8]
test ecx, ecx
je 0x10059c05
mov eax, dword [ecx]
push ecx
call dword [eax + 0xc]
jmp 0x10059c6e
mov eax, dword [esi + 0x108]
test eax, eax
je 0x1005a15c
cmp dword [esi + 0x10c], 0
je 0x1005a15c
lea ecx, [ebp - 0x8c]
push ecx
call eax
test eax, eax
jns 0x10059c40
push str.Failed_setting_state_block_mask_to_all_n
call fcn.10081660
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
lea eax, [ebp - 0x8c]
push eax
push dword [esi + 0xb0]
mov eax, dword [esi + 0x10c]
call eax
test eax, eax
js 0x10059c68
mov ecx, dword [edi]
test ecx, ecx
je 0x10059c68
mov eax, dword [ecx]
push ecx
call dword [eax + 0xc]
jmp 0x10059c6e
mov dword [edi], 0
mov eax, dword [esi + 0xb0]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x114]
cmp dword [esi + 0xe4], 0
lea ebx, [esi + 0xe4]
jne 0x10059cd5
mov eax, dword [esi + 0xb4]
lea edx, [ebp - 8]
push edx
push 0x100cf50c
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
test eax, eax
js 0x10059cd0
mov eax, dword [esi + 0xb0]
push ebx
push 0
push dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x130]
test eax, eax
jns 0x10059cc7
mov dword [ebx], 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [ebx], 0
je 0x10059ce6
mov eax, dword [esi + 0xb0]
push 0
push ebx
push 1
mov ecx, dword [eax]
push eax
call dword [ecx + 0x60]
cmp dword [esi + 0xd8], 0
lea edi, [esi + 0xd8]
jne 0x10059e99
cmp dword [esi + 0x110], 0
jne 0x10059d16
push str.Missing_function_pointer_for_D3D10CreateEffectFromMemory_n
call fcn.10081660
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x104
lea eax, [ebp - 0x294]
push 0x101188a8
push eax
call fcn.100b1b42
add esp, 0xc
lea ecx, [ebp - 0x294]
xor eax, eax
lea edx, [ecx + 2]
mov word [ebp - 0x8e], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10059d41
sub ecx, edx
sar ecx, 1
lea eax, [ecx - 1]
test eax, eax
js 0x10059d7c
jmp 0x10059d60
cmp word [ebp + eax*2 - 0x294], 0x5c
je 0x10059d72
sub eax, 1
jns 0x10059d60
jmp 0x10059d7c
xor edx, edx
mov word [ebp + eax*2 - 0x294], dx
mov eax, 0x103
sub eax, ecx
push eax
lea eax, [ebp - 0x294]
push str._bin_shadersD3D10Overlay.fxo
push eax
call fcn.100b1afd
lea eax, [ebp - 0x294]
push 0x100d22a8
push eax
call fcn.100b1a95
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x10059dc3
push str.Failed_opening_D3D10Overlay.fxo_for_reading_n
call fcn.10081660
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 2
push 0
push edi
mov byte [ebp - 1], 0
call fcn.100b20e1
push edi
call fcn.100b26f4
push edi
mov dword [ebp - 8], eax
call fcn.100b26ff
mov eax, dword [ebp - 8]
add esp, 0x14
test eax, eax
je 0x10059e80
push eax
call fcn.100a1d2b
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x10059e18
push str.Memory_allocation_failure_n
call fcn.10081660
push edi
call fcn.100b17d6
add esp, 8
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
push dword [ebp - 8]
push 1
push eax
call fcn.100b1d6b
mov ecx, dword [ebp - 8]
add esp, 0x10
cmp eax, ecx
je 0x10059e35
mov eax, str.Failed_reading_from_fxo_file_n
jmp 0x10059e6f
lea eax, [esi + 0xd8]
push eax
mov eax, dword [esi + 0x110]
push 0
push dword [esi + 0xb0]
push 0
push ecx
push dword [ebp - 0xc]
call eax
test eax, eax
js 0x10059e6a
cmp dword [esi + 0xd8], 0
je 0x10059e6a
mov byte [ebp - 1], 1
mov eax, str.Created_ID3D10Effect_from_memory_ok__n
jmp 0x10059e6f
mov eax, str.Creating_effect_from_memory_failed__n
push eax
call fcn.10081660
push dword [ebp - 0xc]
call fcn.100a1d34
add esp, 8
push edi
call fcn.100b17d6
add esp, 4
cmp byte [ebp - 1], 0
je 0x10059d0f
lea edi, [esi + 0xd8]
mov eax, dword [edi]
push str.Render
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov dword [esi + 0xdc], eax
test eax, eax
jne 0x10059ec4
push str.Couldnt_get_Render_technique_from_effect_n
call fcn.10081660
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xf8], 0
jne 0x10059ee6
mov eax, dword [edi]
push str.g_viewportHeight
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov dword [esi + 0xf8], eax
cmp dword [esi + 0xfc], 0
jne 0x10059f08
mov eax, dword [edi]
push str.g_viewportWidth
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov dword [esi + 0xfc], eax
cmp dword [esi + 0xf4], 0
jne 0x10059f2a
mov eax, dword [edi]
push str.g_txDiffuse
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov dword [esi + 0xf4], eax
cmp dword [ebx], 0
je 0x10059fdc
cmp dword [esi + 0x100], 0
jne 0x10059fdc
mov eax, dword [edi]
push str.g_bGameUsingsRGB
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov dword [esi + 0x100], eax
test eax, eax
je 0x10059fcf
mov eax, dword [ebx]
lea edx, [ebp - 0x28]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x28]
cmp eax, 0x1d
je 0x10059faf
cmp eax, 0x48
je 0x10059faf
cmp eax, 0x4b
je 0x10059faf
cmp eax, 0x4e
je 0x10059faf
cmp eax, 0x5b
je 0x10059faf
cmp eax, 0x5d
je 0x10059faf
cmp eax, 0x63
je 0x10059faf
push str.Game_is_not_using_sRGB_back_buffer_n
call fcn.10081660
mov eax, dword [esi + 0x100]
add esp, 4
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x84]
jmp 0x10059fdc
push str.Game_is_using_sRGB_back_buffer_n
call fcn.10081660
mov eax, dword [esi + 0x100]
add esp, 4
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x84]
jmp 0x10059fdc
push str.g_bGameUsingsRGB_not_found_in_effect_n
call fcn.10081660
add esp, 4
cmp dword [esi + 0xfc], 0
je 0x10059fee
cmp dword [esi + 0xf8], 0
jne 0x10059ffb
push str.Could_not_find_view_port_height_width_variables_in_effect_n
call fcn.10081660
add esp, 4
cmp dword [esi + 0xe8], 0
lea edi, [esi + 0xe8]
jne 0x1005a0b9
mov eax, dword [esi + 0xdc]
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
lea edx, [ebp - 0x68]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
mov ecx, dword [esi + 0xb0]
lea ebx, [esi + 0xe0]
push ebx
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
mov eax, dword [ecx]
push 3
push 0x101025b8
push ecx
call dword [eax + 0x138]
test eax, eax
jns 0x1005a05a
push str.Failed_creating_input_layout_n
call fcn.10081660
add esp, 4
mov eax, dword [esi + 0xb0]
push dword [ebx]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [esi + 0xb0]
lea edx, [ebp - 0x28]
push edi
push 0
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x28], 0x7080
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], 0x10000
mov dword [ebp - 0x18], 0
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x11c]
test eax, eax
jns 0x1005a0b9
push str.Failed_creating_vertex_buffer_n
call fcn.10081660
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
mov dword [esi + 0xec], 0
push ecx
mov ecx, esi
mov dword [esi + 0xc4], 0
mov dword [esi + 0xcc], 0
call dword [eax + 0x2c]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xb0]
push edx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0x3f800000
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x78]
mov ecx, dword [esi + 0xfc]
test ecx, ecx
je 0x1005a14b
cmp dword [esi + 0xf8], 0
je 0x1005a14b
push dword [ebp - 0x10]
mov eax, dword [ecx]
push ecx
call dword [eax + 0x74]
mov eax, dword [esi + 0xf8]
push dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x74]
pop ebx
pop edi
mov dword [esi + 0xc8], 0
pop esi
mov esp, ebp
pop ebp
ret
push str.We_dont_have_the_function_pointer_for_D3D10StateBlockMaskEnableAll_or_D3D10CreateStateBlock__n
call fcn.10081660
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret