Function at 0x439770
Capabilities:
Check mutex on windows
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x616724]
push ebx
mov ebx, dword [0x61671c]
push esi
push edi
push 0x5af0cc
xor esi, esi
mov dword [ebp - 0x14], eax
push esi
xor edi, edi
mov dword [ebp - 0x1c], ebx
push 0x1f0001
mov byte [ebp - 1], 0
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [ebx + 0x247f8], eax
test eax, eax
jne 0x4397d4
push 0x30
push 0x591508
push 0x5ada04
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
mov eax, 0x3e9
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x14]
push 0
push 0x8000000
push 4
push 0
push 1
push SysReAllocString
add eax, 0x400
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x247fc], eax
cmp eax, 0xffffffff
jne 0x43982b
push 0x30
push 0x591508
push 0x5af140
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
mov eax, 0x3ea
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebx + 0x24804]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebx + 0x24800], eax
cmp eax, 0x80000000
jae 0x439cba
cmp dword [ebx + 0x24804], esi
ja 0x439cba
push 0x80c
mov dword [ebx + 0x24808], 1
call fcn.0056654e
add esp, 4
mov dword [ebx + 0x24810], eax
test eax, eax
jne 0x439885
pop edi
pop esi
mov eax, 0x3ec
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [eax + 0x800], esi
lea ecx, [ebx + 0x24808]
mov eax, dword [ebx + 0x24810]
mov dword [eax + 0x804], esi
mov eax, dword [ebx + 0x24810]
mov dword [eax + 0x808], esi
mov eax, dword [ebx + 0x24810]
mov dword [ebp - 8], eax
cmp dword [ecx], esi
je 0x43995d
nop word [eax + eax]
push 0
push ecx
push 0x800
push eax
push dword [ebx + 0x247fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x439943
mov ecx, dword [ebx + 0x24808]
mov eax, dword [ebp - 8]
test ecx, ecx
je 0x43995d
shr ecx, 1
push 0x80c
mov dword [eax + 0x800], ecx
call fcn.0056654e
mov edx, eax
add esp, 4
mov eax, dword [ebp - 8]
mov dword [eax + 0x804], edx
test edx, edx
je 0x439935
mov ecx, eax
mov eax, edx
mov dword [ebp - 8], eax
mov dword [eax + 0x800], esi
mov dword [eax + 0x804], esi
mov dword [eax + 0x808], ecx
mov ecx, dword [ebx + 0x24808]
test ecx, ecx
je 0x43995d
lea ecx, [ebx + 0x24808]
jmp 0x4398c0
pop edi
pop esi
mov eax, 0x3ee
pop ebx
mov esp, ebp
pop ebp
ret 4
push dword [ebx + 0x247fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 0x3ed
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [ebx + 0x24814], eax
mov edx, 0x1e
lea eax, [ebx + 0x1d4d8]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x43998b
push ecx
call fcn.00560853
mov eax, dword [ebp - 0x10]
add esp, 4
mov edx, dword [ebp - 0x14]
mov dword [eax], esi
add eax, 4
sub edx, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edx
jne 0x439974
mov edx, dword [ebp - 8]
xor eax, eax
mov byte [ebx + 0x1d552], 0
mov word [ebx + 0x1d550], ax
test edx, edx
je 0x439b6e
mov ecx, dword [edx + 0x800]
sub ecx, 1
mov dword [ebp - 0x10], ecx
js 0x439af7
nop word [eax + eax]
movzx eax, word [edx + ecx*2]
cmp eax, 0xa
jne 0x439a63
mov eax, dword [ebp - 0xc]
test eax, eax
jle 0x439a5a
movsx ecx, di
mov dword [ebp - 0x18], ecx
add ecx, 0x7536
lea ecx, [ebx + ecx*4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x439a10
push ecx
call fcn.00560853
mov eax, dword [ebp - 0xc]
add esp, 4
inc esi
mov byte [ebx + 0x1d552], 1
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov ecx, dword [ebp - 0x14]
add esp, 4
mov edx, dword [ebp - 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov word [ebx + 0x1d550], di
inc edi
mov dword [ebp - 0xc], 0
mov dword [ebp + ecx*4 - 0x94], eax
xor eax, eax
mov ecx, dword [ebp - 0x10]
cmp di, 0x1e
cmovge edi, eax
mov byte [ebp - 1], 1
jmp 0x439aeb
cmp eax, 0xd
jne 0x439ae4
cmp byte [ebp - 1], 0
jne 0x439ae7
movsx eax, di
mov dword [ebp - 0x14], eax
add eax, 0x7536
lea eax, [ebx + eax*4]
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
test eax, eax
je 0x439a96
push eax
call fcn.00560853
add esp, 4
mov byte [ebx + 0x1d552], 1
inc esi
mov eax, dword [ebp - 0xc]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov ecx, dword [ebp - 0x18]
add esp, 4
mov edx, dword [ebp - 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov word [ebx + 0x1d550], di
inc edi
mov dword [ebp - 0xc], 0
mov dword [ebp + ecx*4 - 0x94], eax
mov ecx, dword [ebp - 0x10]
cmp di, 0x1e
jl 0x439ae7
xor edi, edi
jmp 0x439ae7
inc dword [ebp - 0xc]
mov byte [ebp - 1], 0
sub ecx, 1
mov dword [ebp - 0x10], ecx
jns 0x4399d0
mov edx, dword [edx + 0x808]
mov dword [ebp - 8], edx
test edx, edx
jne 0x4399b4
mov eax, dword [ebp - 0xc]
test eax, eax
jle 0x439b6e
movsx ecx, di
mov dword [ebp - 0x14], ecx
add ecx, 0x7536
lea ecx, [ebx + ecx*4]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x439b3b
push ecx
call fcn.00560853
mov eax, dword [ebp - 0xc]
add esp, 4
inc esi
mov byte [ebx + 0x1d552], 1
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov ecx, dword [ebp - 0x18]
add esp, 4
mov dword [ecx], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov word [ebx + 0x1d550], di
mov dword [ebp + ecx*4 - 0x94], eax
mov ecx, dword [ebx + 0x24814]
xor eax, eax
xor edi, edi
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x439c61
mov edx, dword [ecx + 0x800]
sub edx, 1
mov dword [ebp - 0x10], edx
js 0x439c3c
movzx ecx, word [ecx + edx*2]
mov dword [ebp - 0x18], ecx
cmp ecx, 0xa
jne 0x439bd1
test edi, edi
jle 0x439bcb
test esi, esi
jle 0x439bac
dec esi
jmp 0x439bbf
movsx ecx, ax
xor edx, edx
mov ecx, dword [ebx + ecx*4 + 0x1d4d8]
mov word [ecx + edi*2], dx
mov edx, dword [ebp - 0x10]
inc eax
xor ecx, ecx
xor edi, edi
cmp ax, 0x1e
cmovge eax, ecx
mov byte [ebp - 1], 1
jmp 0x439c2d
cmp ecx, 0xd
jne 0x439c03
cmp byte [ebp - 1], 0
jne 0x439c29
test esi, esi
jle 0x439be3
dec esi
jmp 0x439bf6
movsx ecx, ax
xor edx, edx
mov ecx, dword [ebx + ecx*4 + 0x1d4d8]
mov word [ecx + edi*2], dx
mov edx, dword [ebp - 0x10]
inc eax
xor edi, edi
cmp ax, 0x1e
jl 0x439c29
xor eax, eax
jmp 0x439c29
test esi, esi
jne 0x439c28
movsx ecx, ax
mov edx, dword [ebp + ecx*4 - 0x94]
mov ecx, dword [ebx + ecx*4 + 0x1d4d8]
sub edx, edi
mov ebx, dword [ebp - 0x18]
mov word [ecx + edx*2 - 2], bx
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
inc edi
mov byte [ebp - 1], 0
mov ecx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 0x10], edx
jns 0x439b95
mov ecx, dword [ecx + 0x808]
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x439b83
test edi, edi
jle 0x439c61
test esi, esi
jg 0x439c61
cwde
mov eax, dword [ebx + eax*4 + 0x1d4d8]
mov word [eax + edi*2], cx
mov esi, dword [ebx + 0x24810]
test esi, esi
je 0x439c83
nop dword [eax + eax]
push esi
mov esi, dword [esi + 0x804]
call fcn.00565fd3
add esp, 4
test esi, esi
jne 0x439c70
push dword [ebx + 0x247fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x247f8]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebx + 0x10]
push eax
push 0
push 0x8013
push dword [ebx + 0xc]
call dword [sym.imp.USER32.dll_SendMessageW]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push dword [ebx + 0x247fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 0x3eb
pop ebx
mov esp, ebp
pop ebp
ret 4