Function at 0x1000d460
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x100540a0
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x1007fa04]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1007fa04]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x9c]
mov esi, dword [esp + 0x88]
mov dword [esp + 0x28], eax
mov eax, dword [0x100834ac]
push eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
cmp esi, edi
mov dword [esp + 0x80], edi
jne 0x1000d6a2
mov esi, dword [0x100834a4]
cmp esi, edi
mov dword [esp + 0x14], esi
jne 0x1000d6a2
call fcn.10001490
lea edx, [esp + 0x30]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x50], edx
mov word [esp + 0x54], di
mov word [esp + 0x56], 0x20
mov byte [esp + 0x30], 0
lea eax, [esp + 0x2c]
push eax
push str.ISC_MSGS
mov byte [esp + 0x88], 1
call fcn.10046a90
add esp, 8
test al, al
je 0x1000d539
mov ecx, dword [esp + 0x50]
push ecx
lea edx, [esp + 0x18]
push edx
call sym.fbclient.dll_gds__msg_open
cmp eax, edi
je 0x1000d677
push 0x104
call sym.fbclient.dll_gds__alloc
mov esi, eax
cmp esi, edi
jne 0x1000d587
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x30]
cmp eax, ecx
mov byte [esp + 0x80], 0
je 0x1000d56a
cmp eax, edi
je 0x1000d56a
mov ecx, dword [eax - 4]
push eax
call fcn.10004590
lea ecx, [esp + 0x18]
mov dword [esp + 0x80], 0xffffffff
call fcn.10001130
mov ax, 0xfffe
jmp 0x1000d7d5
lea edx, [esp + 0x2c]
push edx
push str.LC_MESSAGES
call fcn.10046a90
add esp, 8
test al, al
je 0x1000d618
lea eax, [esp + 0x2c]
call fcn.1000a680
mov eax, dword [0x10071c0c]
push eax
push 0x2f
lea ecx, [esp + 0x34]
call fcn.10045470
mov ecx, dword [0x10071c0c]
cmp eax, ecx
jne 0x1000d5d5
push ecx
push 0x5c
lea ecx, [esp + 0x34]
call fcn.10045470
cmp eax, dword [0x10071c0c]
je 0x1000d5e3
add eax, 1
push eax
push edi
lea ecx, [esp + 0x34]
call fcn.10045320
mov ecx, dword [esp + 0x50]
push ecx
push str.intl_.10s.msg
lea edx, [esp + 0x60]
push 0x1a
push edx
call fcn.10046b10
add esp, 0x10
lea eax, [esp + 0x58]
push eax
push esi
call sym.fbclient.dll_gds__prefix_msg
push esi
lea ecx, [esp + 0x18]
push ecx
call sym.fbclient.dll_gds__msg_open
mov edi, eax
test edi, edi
je 0x1000d630
push str.firebird.msg
push esi
call sym.fbclient.dll_gds__prefix_msg
push esi
lea edx, [esp + 0x18]
push edx
call sym.fbclient.dll_gds__msg_open
mov edi, eax
push esi
call sym.fbclient.dll_gds__free
test edi, edi
je 0x1000d677
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x30]
cmp eax, ecx
mov byte [esp + 0x80], 0
je 0x1000d65b
test eax, eax
je 0x1000d65b
mov ecx, dword [eax - 4]
push eax
call fcn.10004590
lea ecx, [esp + 0x18]
mov dword [esp + 0x80], 0xffffffff
call fcn.10001130
mov ax, di
jmp 0x1000d7d5
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x30]
cmp eax, edx
mov dword [0x100834a4], esi
mov byte [esp + 0x80], 0
je 0x1000d6a2
test eax, eax
je 0x1000d6a2
mov ecx, dword [eax - 4]
push eax
call fcn.10004590
movzx ebx, word [esp + 0x8c]
movzx eax, word [esp + 0x90]
imul ebx, ebx, 0x2710
movzx ecx, word [esi + 8]
add ebx, eax
mov eax, dword [esi]
lea edx, [ecx + esi + 0xc]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
xor ebp, ebp
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 4]
push 0
push ecx
push edx
call dword [sym.imp.MSVCR80.dll__lseek]
add esp, 0xc
test eax, eax
jge 0x1000d6f5
mov ebp, 0xfffffffa
jmp 0x1000d744
movzx eax, word [esi + 8]
mov ecx, dword [esi + 4]
push eax
lea edi, [esi + 0xc]
push edi
push ecx
call dword [sym.imp.MSVCR80.dll__read]
add esp, 0xc
test eax, eax
jge 0x1000d716
mov ebp, 0xfffffff9
jmp 0x1000d744
mov dx, word [esp + 0x14]
cmp dx, word [esi + 0xa]
je 0x1000d74f
test ebp, ebp
mov eax, edi
jne 0x1000d744
cmp eax, dword [esp + 0x1c]
jae 0x1000d736
cmp dword [eax], ebx
jae 0x1000d73d
add eax, 8
jmp 0x1000d727
mov ebp, 0xfffffff8
jmp 0x1000d744
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
add dword [esp + 0x14], 1
test ebp, ebp
je 0x1000d6d6
jmp 0x1000d7be
test ebp, ebp
jne 0x1000d7be
add esi, 0xc
cmp esi, dword [esp + 0x1c]
jae 0x1000d7bb
mov eax, dword [esi]
cmp eax, ebx
ja 0x1000d7bb
je 0x1000d772
movzx ecx, word [esi + 4]
add ecx, 0xb
and ecx, 0xfffffffc
add esi, ecx
jmp 0x1000d756
movzx ecx, word [esp + 0x94]
movzx eax, word [esi + 4]
add ecx, 0xffffffff
cmp ecx, eax
jge 0x1000d78a
movzx eax, cx
jmp 0x1000d78d
movzx eax, ax
mov ebx, dword [esp + 0x28]
movzx edi, ax
push edi
lea edx, [esi + 8]
push edx
push ebx
call sub.MSVCR80.dll_memcpy
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
mov byte [edi + ebx], 0
je 0x1000d7b5
mov cx, word [esi + 6]
mov word [eax], cx
movzx ebp, word [esi + 4]
jmp 0x1000d7be
or ebp, 0xffffffff
lea ecx, [esp + 0x18]
mov dword [esp + 0x80], 0xffffffff
call fcn.10001130
mov ax, bp
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.10052756
add esp, 0x70
ret 0x18