Function at 0x411c00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bb80a
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
push ebx
push esi
push edi
mov eax, dword [0x4f4164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
mov eax, esi
mov dword [ebp - 0x10], 0
cmp dword [esi + 0x14], 8
jb 0x411c41
mov eax, dword [esi]
push 0
push 0x40000080
push 4
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x411d1b
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x411cd4
mov dword [ebp - 0x14], 0
call fcn.0040ba10
mov dword [ebp - 0x18], eax
lock inc dword [ebp - 0x14]
cmp dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 1
jne 0x411ca5
call fcn.0040ba10
mov dword [ebp - 0x18], eax
lock inc dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFileW_failed_with_error__lu
push str.SingleInstanceSessionFile::Create
push 0x400000
lea eax, [ebp - 0x74]
mov dword [ebp - 0x74], 0x20
push eax
push 0
push esi
call fcn.0040df80
add esp, 0x1c
mov eax, dword [ebp - 0x10]
test al, 1
je 0x411d05
and eax, 0xfffffffe
mov dword [ebp - 0x10], eax
or eax, 0xffffffff
mov dword [ebp - 0x18], 0
lock xadd dword [ebp - 0x14], eax
js 0x411d01
call fcn.0040dfb0
or eax, 0xffffffff
lock xadd dword [ebp - 0x14], eax
jns 0x411cf2
lock inc dword [ebp - 0x14]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [edi + 4]
cmp ecx, esi
je 0x411d41
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x411d3a
mov esi, dword [esi]
push eax
push esi
call fcn.004038a0
lea ebx, [edi + 0x20]
push ebx
push 0
push dword [0x4f4090]
push 0
push 2
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
je 0x411d66
mov byte [edi + 0x1c], 1
jmp 0x411f31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
jne 0x411ea8
push 1
push 0x3e8
lea eax, [ebp - 0x78]
mov dword [ebp - 0x78], 0
push eax
push ebx
push dword [edi]
call fcn.00412420
add esp, 0x14
test eax, eax
je 0x411e1f
mov byte [edi + 0x1c], 1
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x411e01
mov dword [ebp - 0x2c], 0
call fcn.0040ba10
mov dword [ebp - 0x30], eax
lock inc dword [ebp - 0x2c]
mov ebx, 2
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x10], ebx
call fcn.00410f80
push str.LockFileEx_succeeded__I_O_pending_
push str.SingleInstanceSessionFile::Create
push 0x400000
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x7c], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x18
jmp 0x411e04
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 2
je 0x411f2e
and ebx, 0xfffffffd
lea ecx, [ebp - 0x30]
jmp 0x411f26
mov byte [edi + 0x1c], 0
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x411e8a
mov dword [ebp - 0x34], 0
call fcn.0040ba10
mov dword [ebp - 0x38], eax
lock inc dword [ebp - 0x34]
mov ebx, 4
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x10], ebx
call fcn.00410f80
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LockFileEx_failed__I_O_pending__with_error__lu
push str.SingleInstanceSessionFile::Create
push 0x400000
lea eax, [ebp - 0x80]
mov dword [ebp - 0x80], 0x20
push eax
push 0
push esi
call fcn.0040df80
add esp, 0x1c
jmp 0x411e8d
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 4
je 0x411f2e
and ebx, 0xfffffffb
lea ecx, [ebp - 0x38]
jmp 0x411f26
mov byte [edi + 0x1c], 0
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x411f11
mov dword [ebp - 0x3c], 0
call fcn.0040ba10
mov dword [ebp - 0x40], eax
lock inc dword [ebp - 0x3c]
mov ebx, 8
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x10], ebx
call fcn.00410f80
push esi
push str.LockFileEx_failed_with_error__lu
push str.SingleInstanceSessionFile::Create
push 0x400000
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x84], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
jmp 0x411f14
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 8
je 0x411f2e
and ebx, 0xfffffff7
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x10], ebx
call fcn.0040b3c0
lea ebx, [edi + 0x20]
cmp byte [edi + 0x1c], 0
mov eax, dword [0x4f8ee0]
je 0x4122f0
add eax, dword [0x4f8edc]
je 0x411fa6
mov dword [ebp - 0x1c], 0
call fcn.0040ba10
mov dword [ebp - 0x20], eax
lock inc dword [ebp - 0x1c]
or dword [ebp - 0x10], 0x10
cmp dword [ebp - 0x20], 0
mov dword [ebp - 4], 4
jne 0x411f78
call fcn.0040ba10
mov dword [ebp - 0x20], eax
lock inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x88]
push str.LockFile_succeeded
push str.SingleInstanceSessionFile::Create
push 0x400000
push ecx
push 0
push eax
mov dword [ebp - 0x88], 0x20
call fcn.0040df80
add esp, 0x18
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test al, 0x10
je 0x411fc2
and eax, 0xffffffef
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], eax
call fcn.0040b3c0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push ebx
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0xa0]
push eax
push 4
lea eax, [ebp - 0x8c]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4121ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
jne 0x41213e
push 1
push 0x3e8
lea eax, [ebp - 0x90]
mov dword [ebp - 0x90], 0
push eax
push ebx
push dword [edi]
call fcn.00412420
add esp, 0x14
test eax, eax
mov eax, dword [0x4f8ee0]
je 0x4120b4
add eax, dword [0x4f8edc]
je 0x412093
mov dword [ebp - 0x44], 0
call fcn.0040ba10
mov dword [ebp - 0x48], eax
lock inc dword [ebp - 0x44]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x48]
or ebx, 0x20
mov dword [ebp - 4], 5
mov dword [ebp - 0x10], ebx
call fcn.00410f80
push str.WriteFile_succeeded__I_O_pending_
push str.SingleInstanceSessionFile::Create
push 0x400000
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x18
jmp 0x412096
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 0x20
je 0x41225b
and ebx, 0xffffffdf
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x10], ebx
jmp 0x412256
add eax, dword [0x4f8edc]
je 0x41211d
mov dword [ebp - 0x4c], 0
call fcn.0040ba10
mov dword [ebp - 0x50], eax
lock inc dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x50]
or ebx, 0x40
mov dword [ebp - 4], 6
mov dword [ebp - 0x10], ebx
call fcn.00410f80
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_failed__I_O_pending__with_error__lu
push str.SingleInstanceSessionFile::Create
push 0x400000
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 0x20
push eax
push 0
push esi
call fcn.0040df80
add esp, 0x1c
jmp 0x412120
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 0x40
je 0x41225b
and ebx, 0xffffffbf
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x10], ebx
jmp 0x412256
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x4121a7
mov dword [ebp - 0x54], 0
call fcn.0040ba10
mov dword [ebp - 0x58], eax
lock inc dword [ebp - 0x54]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x58]
or ebx, 0x80
mov dword [ebp - 4], 7
mov dword [ebp - 0x10], ebx
call fcn.00410f80
push esi
push str.WriteFile_failed_with_error__lu
push str.SingleInstanceSessionFile::Create
push 0x400000
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
jmp 0x4121aa
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, bl
jns 0x41225b
and ebx, 0xffffff7f
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x10], ebx
jmp 0x412256
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x412238
mov dword [ebp - 0x5c], 0
call fcn.0040ba10
mov dword [ebp - 0x60], eax
lock inc dword [ebp - 0x5c]
mov esi, dword [ebp - 0x10]
lea ecx, [ebp - 0x60]
or esi, 0x100
mov dword [ebp - 4], 8
mov dword [ebp - 0x10], esi
call fcn.00410f80
push dword [ebp - 0xa0]
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0x20
push str.WriteFile_succeeded__lu_bytes_written
push str.SingleInstanceSessionFile::Create
push 0x400000
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
jmp 0x41223b
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test esi, 0x100
je 0x41225b
and esi, 0xfffffeff
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x10], esi
call fcn.0040b3c0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41240a
mov byte [eax], 0
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x4122d9
mov dword [ebp - 0x64], 0
call fcn.0040ba10
mov dword [ebp - 0x68], eax
lock inc dword [ebp - 0x64]
mov esi, dword [ebp - 0x10]
lea ecx, [ebp - 0x68]
or esi, 0x200
mov dword [ebp - 4], 9
mov dword [ebp - 0x10], esi
call fcn.00410f80
push str.pfAlreadyExists_is_now_false
push str.SingleInstanceSessionFile::Create
push 0x400000
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xa8], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x18
jmp 0x4122dc
mov esi, dword [ebp - 0x10]
test esi, 0x200
je 0x41240a
lea ecx, [ebp - 0x68]
jmp 0x412405
add eax, dword [0x4f8edc]
je 0x412360
mov dword [ebp - 0x24], 0
call fcn.0040ba10
mov dword [ebp - 0x28], eax
lock inc dword [ebp - 0x24]
or dword [ebp - 0x10], 0x400
cmp dword [ebp - 0x28], 0
mov dword [ebp - 4], 0xa
jne 0x41232b
call fcn.0040ba10
mov dword [ebp - 0x28], eax
lock inc dword [ebp - 0x24]
mov esi, dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LockFile_failed_with_error__lu
push str.SingleInstanceSessionFile::Create
push 0x400000
lea eax, [ebp - 0xac]
mov dword [ebp - 0xac], 0x20
push eax
push 0
push esi
call fcn.0040df80
add esp, 0x1c
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test eax, 0x400
je 0x412381
and eax, 0xfffffbff
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x10], eax
call fcn.0040b3c0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41240a
mov byte [eax], 1
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x4123f7
mov dword [ebp - 0x6c], 0
call fcn.0040ba10
mov dword [ebp - 0x70], eax
lock inc dword [ebp - 0x6c]
mov esi, dword [ebp - 0x10]
lea ecx, [ebp - 0x70]
or esi, 0x800
mov dword [ebp - 4], 0xb
mov dword [ebp - 0x10], esi
call fcn.00410f80
push str.pfAlreadyExists_is_now_true
push str.SingleInstanceSessionFile::Create
push 0x400000
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x18
jmp 0x4123fa
mov esi, dword [ebp - 0x10]
test esi, 0x800
je 0x41240a
lea ecx, [ebp - 0x70]
call fcn.0040b3c0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8