Function at 0x410840
Capabilities:
Clear file content
Read file on windows
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x43e9e1
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x451d80]
xor eax, esp
mov dword [esp + 0xb8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x451d80]
xor eax, esp
push eax
lea eax, [esp + 0xd4]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xe4]
mov eax, dword [esp + 0xf4]
mov esi, ecx
test esi, esi
mov dword [ebp + 0x10c], eax
lea edi, [ebp + 0xb0]
jne 0x41089f
xor eax, eax
jmp 0x4108a6
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov ebx, eax
mov esi, edi
call fcn.00406eb0
lea ebx, [ebp + 0xbc]
mov eax, ebx
call fcn.0040b470
mov eax, dword [ebx]
push 0x5c
push eax
call fcn.00426f79
add esp, 8
test eax, eax
jne 0x4108d3
or esi, 0xffffffff
jmp 0x4108d9
sub eax, dword [ebx]
sar eax, 1
mov esi, eax
lea edx, [esp + 0x18]
lea ecx, [esi + 1]
push edx
call fcn.0040b4f0
mov edi, eax
lea eax, [ebp + 0xb0]
mov dword [esp + 0xdc], 0
call fcn.0040b470
mov dword [esp + 0xdc], 0xffffffff
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x45352c
je 0x410936
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x410936
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
push eax
call fcn.00419273
add esp, 4
mov edx, dword [ebx]
mov ecx, dword [edx - 8]
lea eax, [esp + 0x18]
sub ecx, esi
push eax
sub ecx, 1
push ebx
call fcn.0040b5a0
mov edi, eax
mov eax, ebx
mov dword [esp + 0xdc], 1
call fcn.0040b470
mov dword [esp + 0xdc], 0xffffffff
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x45352c
je 0x410997
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x410997
mov eax, dword [esp + 0x18]
add eax, 0xfffffff4
push eax
call fcn.00419273
add esp, 4
mov eax, dword [ebx]
mov esi, dword [eax - 8]
lea edi, [ebp + 0xc0]
call fcn.0040b680
push str..idx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, str..idx
lea edi, [ebp + 0xc0]
call fcn.0040b680
lea eax, [ebp + 0xb4]
lea edi, [ebp + 0xb0]
call fcn.0040b470
push 0x4474e8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, 0x4474e8
lea edi, [ebp + 0xb4]
call fcn.0040b680
mov ebx, dword [ebx]
mov esi, dword [ebx - 8]
mov eax, ebx
lea edi, [ebp + 0xb4]
call fcn.0040b680
lea ebx, [ebp + 0xb8]
lea edi, [ebp + 0xb0]
mov eax, ebx
call fcn.0040b470
push 0x4474e8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, 0x4474e8
mov edi, ebx
call fcn.0040b680
mov eax, dword [ebp + 0xc0]
mov esi, dword [eax - 8]
call fcn.0040b680
mov eax, dword [ebp + 0xe8]
mov ecx, dword [ebp + 0xec]
mov edx, eax
or edx, ecx
je 0x410a74
mov edx, dword [ebp + 0xf0]
mov esi, dword [ebp + 0xf4]
mov edi, edx
or edi, esi
je 0x410a74
cmp eax, edx
jne 0x410a74
cmp ecx, esi
jne 0x410a74
mov eax, 0x1e
jmp 0x41104f
cmp dword [esp + 0xf4], 0
je 0x410dcd
lea ecx, [ebp + 0xb4]
lea eax, [esp + 0x1c]
call fcn.00406b30
push str..md5
mov dword [esp + 0xe0], 2
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, str..md5
lea edi, [esp + 0x1c]
call fcn.0040b680
mov esi, dword [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x44], ebx
jne 0x410b11
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0xc]
cmp eax, 0x45352c
je 0x410b07
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x410b07
push esi
call fcn.00419273
add esp, 4
mov eax, 4
jmp 0x41104f
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
lea ecx, [esp + 0x3c]
push ecx
push 8
lea edx, [esp + 0x38]
push edx
push ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x4c], eax
call edi
test eax, eax
jne 0x410b6f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0xc]
cmp eax, 0x45352c
je 0x410b65
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x410b65
push esi
call fcn.00419273
add esp, 4
mov eax, 5
jmp 0x41104f
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 0
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0xf4], ecx
push 4
lea ecx, [esp + 0x34]
push ecx
push ebx
mov dword [esp + 0x104], edx
call edi
test eax, eax
jne 0x410bb4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [esp + 0x1c]
call fcn.00406de0
mov eax, 5
jmp 0x41104f
mov eax, dword [esp + 0x28]
shl eax, 0xa
xor ecx, ecx
mov edx, eax
add edx, dword [esp + 0x2c]
mov esi, ecx
adc esi, dword [esp + 0x30]
push ecx
add edx, 0xffffffff
push eax
adc esi, 0xffffffff
push esi
push edx
mov dword [esp + 0x38], eax
call fcn.0043cf80
push 2
lea edx, [esp + 0x40]
push edx
mov esi, eax
xor eax, eax
xor ecx, ecx
push ecx
mov edi, esi
push eax
shl edi, 4
push ebx
add edi, 0x1c
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x410b9a
cmp edi, dword [esp + 0x3c]
jne 0x410b9a
push 0
push edi
push 0
push 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
je 0x410b9a
push edi
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x18], eax
add eax, 0xc
test esi, esi
mov dword [esp + 0x24], eax
jbe 0x410c92
mov dword [esp + 0x34], esi
jmp 0x410c54
mov eax, dword [esp + 0x24]
test eax, eax
je 0x410c73
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x4c], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x50], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edx
lea ebx, [esp + 0x4c]
lea esi, [ebp + 0xfc]
call fcn.004114d0
add dword [esp + 0x24], 0x10
sub dword [esp + 0x34], 1
jne 0x410c50
mov ebx, dword [esp + 0x44]
lea eax, [esp + 0x5c]
call fcn.0040f790
mov ecx, dword [esp + 0x18]
push ecx
lea eax, [edi - 0x10]
lea ecx, [esp + 0x60]
call fcn.00414a40
lea ecx, [esp + 0x5c]
call fcn.00414ae0
mov edx, dword [esp + 0x24]
mov eax, 0x10
lea ecx, [esp + 0xb4]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x410cdd
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x410cc5
test eax, eax
je 0x410d3a
movzx edi, byte [ecx]
movzx esi, byte [edx]
sub esi, edi
jne 0x410d2c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x410d3a
movzx edi, byte [ecx]
movzx esi, byte [edx]
sub esi, edi
jne 0x410d2c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x410d3a
movzx edi, byte [ecx]
movzx esi, byte [edx]
sub esi, edi
jne 0x410d2c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x410d3a
movzx eax, byte [ecx]
movzx esi, byte [edx]
sub esi, eax
je 0x410d3a
test esi, esi
mov eax, 1
jg 0x410d3c
or eax, 0xffffffff
jmp 0x410d3c
xor eax, eax
test eax, eax
je 0x410d81
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
lea eax, [ebp + 0xfc]
call fcn.00411550
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 0xc]
cmp ecx, 0x45352c
je 0x410b65
lea esi, [eax - 0xc]
jmp 0x410b51
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
mov dword [esp + 0xdc], 0xffffffff
mov eax, dword [esp + 0x1c]
lea ecx, [eax - 0xc]
cmp ecx, 0x45352c
je 0x410dcd
lea esi, [eax - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x410dcd
push esi
call fcn.00419273
add esp, 4
mov eax, ebp
call fcn.00410070
mov eax, dword [ebp + 0xb8]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0xa4], eax
jne 0x410e18
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x25a
call ebx
push eax
push str.Create_idx_failed._errno:__u__line:_u
jmp 0x410eaa
mov eax, dword [ebp + 0xb4]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0xa0], eax
jne 0x410e53
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x263
call ebx
push eax
push str.Create_data_failed._errno:__u__line:_u
jmp 0x410eaa
push 1
mov ebx, ebp
call fcn.004100f0
test eax, eax
je 0x410e75
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x26b
call ebx
push eax
push str.Load_failed._errno:__u__line:_u
jmp 0x410eaa
mov edx, dword [esp + 0xec]
cmp edx, dword [ebp + 0xe8]
jne 0x410e97
mov eax, dword [esp + 0xf0]
cmp eax, dword [ebp + 0xec]
je 0x41104a
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x272
call ebx
push eax
push str.Check_failed._errno:__u__line:_u
mov edi, 4
call fcn.00415780
add esp, 0xc
cmp dword [ebp + 0xf8], 0
jne 0x410ec9
cmp dword [ebp + 0x98], 0
je 0x410ed3
mov eax, 0x1a
jmp 0x41104f
mov eax, ebp
call fcn.00410070
mov eax, dword [ebp + 0xb8]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0xa4], eax
jne 0x410f28
push 0x227
call ebx
push eax
push str.Create_idx_file_failed._errno:__u__line:_u
mov edi, 4
call fcn.00415780
add esp, 0xc
lea eax, [edi - 2]
jmp 0x41104f
mov eax, dword [ebp + 0xb4]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0xa0], eax
jne 0x410f5d
push 0x22e
call ebx
push eax
push str.Create_data_file_failed._errno:__u__line:_u
jmp 0x410f13
mov esi, dword [esp + 0xf0]
mov edi, dword [esp + 0xec]
push 0
push 0
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x410f99
call ebx
push eax
push str.SetFilePointerEx_failed._errno:__u
mov edi, 4
call fcn.00415780
add esp, 8
lea eax, [edi - 3]
jmp 0x41104f
mov ecx, dword [ebp + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x410fb4
call ebx
push eax
push str.SetEndOfFile_failed._errno:__u
jmp 0x410f84
mov eax, dword [esp + 0xe8]
mov edx, dword [eax]
mov dword [ebp + 0xc4], edx
mov ecx, dword [eax + 4]
mov dword [ebp + 0xc8], ecx
mov edx, dword [eax + 8]
lea ecx, [esp + 0x44]
push ecx
xor ebx, ebx
mov dword [ebp + 0xcc], edx
mov edx, dword [ebp + 0xa0]
mov eax, dword [eax + 0xc]
push ebx
push ebx
push edx
mov dword [ebp + 0xd0], eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp + 0xd4]
push eax
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov dword [ebp + 0xec], esi
mov dword [ebp + 0xf0], ebx
mov dword [ebp + 0xf4], ebx
mov dword [esp + 0x20], ebx
lea ebx, [esp + 0x20]
mov esi, ebp
mov dword [ebp + 0xe8], edi
call fcn.00410320
mov edx, dword [esp + 0x20]
push edx
call fcn.00410760
mov eax, ebp
call fcn.004070e0
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 0x1c
jmp 0x41104f
mov eax, 0x1b
mov ecx, dword [esp + 0xd4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xb8]
xor ecx, esp
call fcn.0042655f
add esp, 0xcc
ret 0x14