Function at 0x4655b9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x59a240]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x38]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push 0x32
push edi
push eax
mov dword [ebp - 0x240], edi
call fcn.004e4da0
push 0x100
lea eax, [ebp - 0x138]
push edi
push eax
call fcn.004e4da0
push 0x104
lea eax, [ebp - 0x23c]
push edi
push eax
call fcn.004e4da0
push esi
call fcn.0049f486
add esp, 0x28
test eax, eax
jne 0x4656bf
lea eax, [ebp - 0x23c]
push esi
push eax
call fcn.0046379e
pop ecx
pop ecx
push edi
push SQLGetDiagRec
push 1
push edi
push 7
push 6
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4656d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push SQLGetDiagRec
push 4
push 0
push 7
mov edi, eax
lea eax, [ebp - 0x23c]
push 6
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4656d0
call fcn.004ca9ca
sub eax, dword [0x684a44]
cmp eax, 0xea60
ja 0x465698
call fcn.0040ead4
test eax, eax
jne 0x4656bf
call fcn.004ca9ca
mov dword [0x684a44], eax
mov eax, str._GetLastError_
push eax
push edi
push eax
push edi
lea eax, [ebp - 0x23c]
push eax
push str.:3:SetServerLockedFlagFile___FAILED:_10min:_CreateFile___s___FAILED:_GetLastError___should_be___ld:__s_ld:_Second_Error:__s
call fcn.00425c08
add esp, 0x18
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3632
leave
ret
xor edi, edi
lea eax, [ebp - 0x38]
push 0x32
push eax
call fcn.004604d7
cmp dword [ebp + 0xc], 0
pop ecx
pop ecx
je 0x4656f8
push 0x32
lea eax, [ebp - 0x38]
push 0x50b484
push eax
call fcn.004a10b8
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x138]
push str._nLock_was_initiated_by:__s
push eax
call fcn.00404f28
add esp, 0xc
lea eax, [ebp - 0x240]
push edi
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.004ee800
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
pop ecx
push eax
lea eax, [ebp - 0x138]
push eax
push esi
call edi
test eax, eax
jne 0x46575d
mov eax, dword [0x684a40]
mov ecx, eax
inc eax
mov dword [0x684a40], eax
cmp ecx, 0xa
jae 0x46575d
push str._GetLastError_
push str.:7:SetServerLockedFlagFile___FAILED:_WriteFile___FAILED:__s
call fcn.004255b9
pop ecx
pop ecx
push ebx
call fcn.0049f486
pop ecx
test eax, eax
jne 0x46579e
push ebx
lea eax, [ebp - 0x138]
push str._nIn_Source_File:__s
push eax
call fcn.00404f28
add esp, 0xc
lea eax, [ebp - 0x240]
push 0
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.004ee800
pop ecx
push eax
lea eax, [ebp - 0x138]
push eax
push esi
call edi
cmp dword [ebp + 0x14], 0
jle 0x4657dc
push dword [ebp + 0x14]
lea eax, [ebp - 0x138]
push str._nFrom_Source_Line:__d
push eax
call fcn.00404f28
add esp, 0xc
lea eax, [ebp - 0x240]
push 0
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.004ee800
pop ecx
push eax
lea eax, [ebp - 0x138]
push eax
push esi
call edi
push 0x274d
push str.E:UserskerryDocumentsVisual_Studio_2022ProjectsPAULA__TEMP_COPY_Network.c
push str.SetServerLockedFlagFile
push esi
call fcn.00426fac
xor eax, eax
inc eax
jmp 0x4656c1