Function at 0x4189d0
Capabilities:
Check mutex on windows
Get file size
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x424050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x244], ecx
cmp dword [ebp + 8], 0
je 0x41932f
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
je 0x41932f
push 0x10000000
push 0
call fcn.00417c50
add esp, 8
mov edx, dword [ebp - 0x244]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x244]
cmp dword [eax + 4], 0
je 0x41932f
mov ecx, dword [str.elcomsoft_dic_mutex_F65EAB1A_A62B_4fd3_B491_D7A469A668B5_]
push ecx
lea edx, [ebp - 0x210]
push edx
call fcn.00401ba9
add esp, 8
push 0x5c
mov eax, dword [ebp + 8]
push eax
call fcn.00401000
add esp, 8
add eax, 2
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.00401b7b
add esp, 8
lea edx, [ebp - 0x210]
push edx
push 0
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 4]
push ecx
call fcn.00417ac0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edx, dword [ebp - 0x244]
mov dword [edx + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x244]
cmp dword [eax + 8], 0
je 0x41931d
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x41930d
cmp dword [ebp - 0x214], 0xb7
jne 0x418c50
mov eax, dword [str.elcomsoft_dic_map_file_F65EAB1A_A62B_4fd3_B491_D7A469A668B5_]
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.00401ba9
add esp, 8
push 0x5c
mov edx, dword [ebp + 8]
push edx
call fcn.00401000
add esp, 8
add eax, 2
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00401b7b
add esp, 8
lea ecx, [ebp - 0x210]
push ecx
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov edx, dword [ebp - 0x244]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0x244]
cmp dword [eax + 0xc], 0
je 0x418c4b
push 0
push 0
push 0
push 4
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x244]
cmp dword [edx + 0x10], 0
je 0x418c4b
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx]
xor eax, eax
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 0x430], edx
mov dword [ecx + 0x434], eax
mov edx, dword [ebp - 0x244]
mov esi, dword [edx + 0x10]
mov eax, dword [ebp - 0x244]
push 0
push 4
mov ecx, dword [eax + 0x434]
push ecx
mov edx, dword [eax + 0x430]
push edx
call fcn.00410390
lea eax, [esi + eax + 4]
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 0x424], eax
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x10]
add eax, 4
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 0x428], eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x244]
add eax, 0x14
push eax
call fcn.00401ba9
add esp, 8
push 0x5c
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401000
add esp, 8
add eax, 2
push eax
mov edx, dword [ebp - 0x244]
add edx, 0x21c
push edx
call fcn.00401ba9
add esp, 8
push 0x422354
mov eax, dword [ebp - 0x244]
add eax, 0x21c
push eax
call fcn.00401020
add esp, 8
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x244]
mov byte [edx], 1
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov al, 1
jmp 0x419331
jmp 0x41930d
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0xffffffff
je 0x4192fd
push 0
mov eax, dword [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0xffffffff
je 0x4192e7
cmp dword [ebp - 0x21c], 0
je 0x4192e7
mov eax, dword [ebp - 0x21c]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x4192e7
mov edx, dword [ebp - 0x21c]
shr edx, 1
mov dword [ebp - 0x220], edx
xor ecx, ecx
mov eax, dword [ebp - 0x220]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004019e5
add esp, 4
mov dword [ebp - 0x238], eax
mov eax, dword [ebp - 0x244]
mov ecx, dword [ebp - 0x238]
mov dword [eax + 0x424], ecx
mov edx, dword [ebp - 0x244]
cmp dword [edx + 0x424], 0
je 0x4192e7
mov dword [ebp - 0x224], 0
push 0
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [ebp - 0x21c]
push ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x424]
push eax
mov ecx, dword [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4192b6
cmp dword [ebp - 0x224], 4
jb 0x4192b6
mov edx, dword [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x218], 0xffffffff
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x424]
movzx edx, word [ecx]
cmp edx, 0xfeff
jne 0x4192b6
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x424]
mov dword [ebp - 0x228], ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x424]
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x228]
movzx edx, word [ecx]
cmp edx, 0xfeff
je 0x418de6
mov eax, dword [ebp - 0x228]
movzx ecx, word [eax]
cmp ecx, 0xd
je 0x418de6
mov edx, dword [ebp - 0x228]
movzx eax, word [edx]
cmp eax, 0xa
jne 0x418e14
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0x424]
mov eax, dword [ebp - 0x220]
lea ecx, [edx + eax*2]
cmp dword [ebp - 0x228], ecx
jae 0x418e14
mov edx, dword [ebp - 0x228]
add edx, 2
mov dword [ebp - 0x228], edx
jmp 0x418db9
mov eax, dword [ebp - 0x244]
mov dword [eax + 0x430], 0
mov dword [eax + 0x434], 0
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0x424]
mov eax, dword [ebp - 0x220]
lea ecx, [edx + eax*2]
cmp dword [ebp - 0x228], ecx
jae 0x418f3f
mov edx, dword [ebp - 0x228]
movzx eax, word [edx]
cmp eax, 0xd
je 0x418eac
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0x424]
mov eax, dword [ebp - 0x220]
lea ecx, [edx + eax*2]
cmp dword [ebp - 0x228], ecx
jae 0x418eac
mov edx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x228]
mov cx, word [eax]
mov word [edx], cx
mov edx, dword [ebp - 0x22c]
add edx, 2
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x228]
add eax, 2
mov dword [ebp - 0x228], eax
jmp 0x418e4f
xor ecx, ecx
mov edx, dword [ebp - 0x22c]
mov word [edx], cx
mov eax, dword [ebp - 0x22c]
add eax, 2
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0x430]
add edx, 1
mov eax, dword [ecx + 0x434]
adc eax, 0
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 0x430], edx
mov dword [ecx + 0x434], eax
mov edx, dword [ebp - 0x228]
movzx eax, word [edx]
cmp eax, 0xd
je 0x418f0c
mov ecx, dword [ebp - 0x228]
movzx edx, word [ecx]
cmp edx, 0xa
jne 0x418f3a
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x424]
mov edx, dword [ebp - 0x220]
lea eax, [ecx + edx*2]
cmp dword [ebp - 0x228], eax
jae 0x418f3a
mov ecx, dword [ebp - 0x228]
add ecx, 2
mov dword [ebp - 0x228], ecx
jmp 0x418ef0
jmp 0x418e2e
mov edx, dword [ebp - 0x244]
mov dword [ebp - 0x248], edx
mov eax, dword [ebp - 0x248]
mov ecx, dword [ebp - 0x248]
mov edx, dword [eax + 0x430]
or edx, dword [ecx + 0x434]
je 0x4192b6
mov eax, dword [str.elcomsoft_dic_map_file_F65EAB1A_A62B_4fd3_B491_D7A469A668B5_]
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.00401ba9
add esp, 8
push 0x5c
mov edx, dword [ebp + 8]
push edx
call fcn.00401000
add esp, 8
add eax, 2
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00401b7b
add esp, 8
lea ecx, [ebp - 0x210]
push ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x430]
mov ecx, dword [ebp - 0x220]
shl ecx, 1
lea edx, [ecx + eax*4 + 4]
push edx
push 0
push 4
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 4]
push ecx
call fcn.00417ac0
add esp, 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
je 0x4192b6
push 0
push 0
push 0
push 6
mov edx, dword [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x244]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x244]
cmp dword [edx + 0x10], 0
je 0x4192a9
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x430]
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x10]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x220]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x424]
push eax
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 0x10]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x430]
lea edx, [edx + ecx*4 + 4]
push edx
call fcn.004013e0
add esp, 0xc
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x424]
mov dword [ebp - 0x23c], ecx
mov edx, dword [ebp - 0x23c]
push edx
call fcn.00401970
add esp, 4
mov eax, dword [ebp - 0x244]
mov esi, dword [eax + 0x10]
mov ecx, dword [ebp - 0x244]
push 0
push 4
mov edx, dword [ecx + 0x434]
push edx
mov eax, dword [ecx + 0x430]
push eax
call fcn.00410390
lea ecx, [esi + eax + 4]
mov edx, dword [ebp - 0x244]
mov dword [edx + 0x424], ecx
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x10]
add ecx, 4
mov edx, dword [ebp - 0x244]
mov dword [edx + 0x428], ecx
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x424]
mov dword [ebp - 0x228], ecx
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 0x424]
mov ecx, dword [ebp - 0x220]
lea edx, [eax + ecx*2]
cmp dword [ebp - 0x228], edx
jae 0x41914a
mov eax, dword [ebp - 0x228]
movzx ecx, word [eax]
cmp ecx, 0xfeff
je 0x419139
mov edx, dword [ebp - 0x228]
movzx eax, word [edx]
cmp eax, 0xd
je 0x419139
mov ecx, dword [ebp - 0x228]
movzx edx, word [ecx]
cmp edx, 0xa
jne 0x41914a
mov eax, dword [ebp - 0x228]
add eax, 2
mov dword [ebp - 0x228], eax
jmp 0x4190ef
mov ecx, dword [ebp - 0x244]
mov edx, dword [ebp - 0x228]
sub edx, dword [ecx + 0x424]
sar edx, 1
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x428]
mov dword [ecx], edx
mov dword [ebp - 0x234], 1
mov edx, dword [ebp - 0x234]
xor eax, eax
mov ecx, dword [ebp - 0x244]
mov dword [ebp - 0x250], edx
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x254], ecx
mov edx, dword [ebp - 0x254]
mov eax, dword [ebp - 0x24c]
cmp eax, dword [edx + 0x434]
ja 0x41922e
jb 0x4191c4
mov ecx, dword [ebp - 0x254]
mov edx, dword [ebp - 0x250]
cmp edx, dword [ecx + 0x430]
jae 0x41922e
mov eax, dword [ebp - 0x228]
movzx ecx, word [eax]
test ecx, ecx
je 0x4191e2
mov edx, dword [ebp - 0x228]
add edx, 2
mov dword [ebp - 0x228], edx
jmp 0x4191c4
mov eax, dword [ebp - 0x228]
add eax, 2
mov dword [ebp - 0x228], eax
mov ecx, dword [ebp - 0x244]
mov edx, dword [ebp - 0x228]
sub edx, dword [ecx + 0x424]
sar edx, 1
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x428]
mov eax, dword [ebp - 0x234]
mov dword [ecx + eax*4], edx
mov ecx, dword [ebp - 0x234]
add ecx, 1
mov dword [ebp - 0x234], ecx
jmp 0x419176
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x244]
add eax, 0x14
push eax
call fcn.00401ba9
add esp, 8
push 0x5c
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401000
add esp, 8
add eax, 2
push eax
mov edx, dword [ebp - 0x244]
add edx, 0x21c
push edx
call fcn.00401ba9
add esp, 8
push 0x4223dc
mov eax, dword [ebp - 0x244]
add eax, 0x21c
push eax
call fcn.00401020
add esp, 8
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x244]
mov byte [edx], 1
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov al, 1
jmp 0x419331
mov edx, dword [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0x424]
mov dword [ebp - 0x240], ecx
mov edx, dword [ebp - 0x240]
push edx
call fcn.00401970
add esp, 4
mov eax, dword [ebp - 0x244]
mov dword [eax + 0x424], 0
cmp dword [ebp - 0x218], 0xffffffff
je 0x4192fd
mov ecx, dword [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 4]
push ecx
call fcn.00417bf0
add esp, 4
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004013ae
mov esp, ebp
pop ebp
ret 4