Function at 0x41eeae
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0042b680
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp word [esi + 0x3744], bx
je 0x41eef3
movzx eax, word [0x452bfe]
push 0x4536c4
lea edi, [eax + esi + 0x3750]
lea eax, [esi + 0x3746]
push eax
call fcn.0042b1f0
pop ecx
mov byte [edi], 0x4c
pop ecx
mov byte [edi + 1], 0x4d
lea edi, [esi + 0x3746]
push edi
push str.Open_LSD_data_file___s_
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x3c00], eax
jne 0x41ef77
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x1024]
push 0x1000
push eax
call edi
push eax
call fcn.00424a92
add esp, 0xc
push eax
push str.Cant_open_LSD_data_file____s
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
call edi
test eax, 0xffffff80
je 0x41ef69
mov eax, 0x8030
jmp 0x41f2c9
xor ecx, ecx
mov ch, al
or cx, 0x8030
jmp 0x41f2c7
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
add eax, 0xfffffff0
cmp eax, 0xffffffff
mov dword [esi + 0x884], eax
jne 0x41efb2
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x41efb2
push str.Error_reading_size_of_LSD_document
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
pop ecx
call edi
jmp 0x41f2b0
cmp dword [ebp - 0x24], ebx
je 0x41efbe
or dword [esi + 0x884], 0xffffffff
lea eax, [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push eax
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [esi + 0x3c00]
call edi
test eax, eax
je 0x41f29b
cmp dword [ebp - 4], 0x10
jne 0x41f29b
mov ecx, dword [esi + 0x58]
call fcn.0041eaa4
push str.LSD_request_header_...
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
lea eax, [ebp - 0x1c]
pop ecx
mov ecx, dword [esi + 0x58]
push 0x10
push eax
call fcn.0041e766
mov ecx, dword [esi + 0x58]
call fcn.0041eaaf
cmp dword [ebp - 0x1c], 0x4d4c464c
jne 0x41f291
cmp byte [ebp - 0x15], bl
jne 0x41f291
cmp byte [ebp - 0x18], 1
jbe 0x41f039
push str.LSD_job_type_requested_is_invalid
jmp 0x41f05b
cmp byte [ebp - 0x18], bl
jne 0x41f177
mov eax, dword [ebp - 0x10]
mov word [esi + 0x8a0], 1
cmp eax, 6
mov dword [ebp - 0x20], eax
jbe 0x41f06e
push str.LSD_read_request_data_length_is_invalid
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8032
pop ecx
jmp 0x41f2c9
jae 0x41f081
push eax
push str.LSD_read_request_data_is_truncated___u_bytes_present_
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
push 6
lea eax, [ebp - 0xc]
push ebx
push eax
call fcn.0042b620
add esp, 0xc
lea eax, [ebp - 4]
push ebx
mov ebx, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [esi + 0x3c00]
call edi
test eax, eax
je 0x41f16d
cmp dword [ebp - 4], ebx
jne 0x41f16d
mov eax, dword [ebp - 0xb]
mov bl, byte [ebp - 0xc]
mov dword [esi + 0x373c], eax
push eax
movzx eax, bl
push eax
push str.LSD_read_request:_Flags__0x_02X__TEC_pages__0x_08X
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0x10
test bl, 1
je 0x41f123
or dword [esi + 0x373c], 0x23770
mov eax, dword [esi + 0x373c]
test word [0x453276], 0xaa0
je 0x41f102
or eax, 0x240000
mov dword [esi + 0x373c], eax
test word [0x453276], 0x1540
je 0x41f12e
mov eax, dword [esi + 0x373c]
xor eax, 0x3530
or eax, 0x100000
mov dword [esi + 0x373c], eax
test word [0x453276], 0x1540
jne 0x41f146
test bl, 2
je 0x41f13a
or dword [esi + 0x373c], 0xf
test bl, 4
je 0x41f146
or byte [esi + 0x373d], 8
test bl, 8
je 0x41f152
or byte [esi + 0x373f], 0x40
push dword [esi + 0x373c]
push str.LSD_pages_to_read__0x_08X
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
jmp 0x41f277
push str.Error_reading_LSD_read_request_block
jmp 0x41f2a0
mov eax, dword [ebp - 0x10]
push str.LSD_write___scanning
push dword [esi + 0x58]
mov word [esi + 0x1a76], 1
mov word [esi + 0x1a74], bx
mov dword [esi + 0x1a7c], eax
mov dword [esi + 0x373c], ebx
call fcn.0041e63d
pop ecx
pop ecx
push ebx
mov ecx, esi
call fcn.0040f15b
cmp ax, bx
jne 0x41f2c9
mov ax, word [esi + 0x1aa4]
cmp ax, 2
je 0x41f206
cmp ax, 1
jne 0x41f27c
movzx eax, word [esi + 0x3c0e]
push dword [esi + 0x3740]
push eax
movzx eax, word [esi + 0x1a5a]
push eax
push str.Scan_LSD_page__u__ID__u__length__u
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0x14
mov ecx, esi
push ebx
call fcn.0041f2ce
cmp ax, bx
jne 0x41f2c9
jmp 0x41f1a5
push str.Finished_reading_to_end_of_LSD_data
push dword [esi + 0x58]
call fcn.0041e63d
cmp dword [esi + 0x373c], ebx
pop ecx
pop ecx
jne 0x41f235
push str.No_LSD_data_to_write
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8040
pop ecx
jmp 0x41f2c9
push ebx
push ebx
push 0x10
push dword [esi + 0x3c00]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41f251
push str.Failed_to_seek_to_LSD_data_page_header
jmp 0x41f2a0
mov eax, dword [ebp - 0x10]
mov word [esi + 0x1a76], 1
mov word [esi + 0x1a74], bx
mov dword [esi + 0x1a7c], eax
mov dword [esi + 0x888], ebx
mov word [esi + 0x1a5a], bx
xor ax, ax
jmp 0x41f2c9
push str.LSD:_LSD_document_is_corrupt___expecting_page_header
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x8039
pop ecx
jmp 0x41f2c9
push str.LSD_data_file_is_invalid
jmp 0x41f05b
push str.Error_reading_LSD_file_header
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0xffffff80
je 0x41f2be
mov eax, 0x8037
jmp 0x41f2c9
xor ecx, ecx
mov ch, al
or cx, 0x8037
mov eax, ecx
pop edi
pop esi
pop ebx
leave
ret