Function at 0x4afb60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x6fb448]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 4], 0
mov byte [ebp - 0x3c], 0
push 0x31
push 0
lea eax, [ebp - 0x3b]
push eax
call fcn.005b02a0
add esp, 0xc
mov byte [ebp - 0x248], 0
push 0xff
push 0
lea ecx, [ebp - 0x247]
push ecx
call fcn.005b02a0
add esp, 0xc
mov byte [ebp - 0x148], 0
push 0x103
push 0
lea edx, [ebp - 0x147]
push edx
call fcn.005b02a0
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
call fcn.00401389
add esp, 4
test eax, eax
je 0x4afbe6
xor eax, eax
jmp 0x4afe03
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x148]
push edx
call fcn.0040311b
add esp, 8
push 0
push SQLGetDiagRec
push 1
push 0
push 7
push 6
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x4afcb5
mov dword [ebp - 0x24c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24c], eax
push 0
push SQLGetDiagRec
push 4
push 0
push 7
push 6
lea ecx, [ebp - 0x148]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x4afcb5
call fcn.0040323d
sub eax, dword [0x8164b0]
cmp eax, 0xea60
ja 0x4afc78
call fcn.00401127
test eax, eax
jne 0x4afcae
call fcn.0040323d
mov dword [0x8164b0], eax
push 0x69822c
mov edx, dword [ebp - 0x24c]
push edx
push 0x69823c
mov eax, dword [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x148]
push ecx
push str.:3:SetServerLockedFlagFile___FAILED:_10min:_CreateFile___s___FAILED:_GetLastError___should_be___ld:__s_ld:_Second_Error:__s
call fcn.004018ca
add esp, 0x18
xor eax, eax
jmp 0x4afe03
push 0x32
lea edx, [ebp - 0x3c]
push edx
call fcn.004020e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x4afcdc
push 0x32
push 0x6982d0
lea eax, [ebp - 0x3c]
push eax
call fcn.004014f1
add esp, 0xc
lea ecx, [ebp - 0x3c]
push ecx
push str._nLock_was_initiated_by:__s
lea edx, [ebp - 0x248]
push edx
call fcn.005b6660
add esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x248]
push ecx
call fcn.005b4690
add esp, 4
push eax
lea edx, [ebp - 0x248]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4afd4b
mov ecx, dword [0x8164ac]
mov edx, dword [0x8164ac]
add edx, 1
mov dword [0x8164ac], edx
cmp ecx, 0xa
jae 0x4afd4b
push 0x69830c
push str.:7:SetServerLockedFlagFile___FAILED:_WriteFile___FAILED:__s
call fcn.00401014
add esp, 8
mov eax, dword [ebp + 0x10]
push eax
call fcn.00401389
add esp, 4
test eax, eax
jne 0x4afd9a
mov ecx, dword [ebp + 0x10]
push ecx
push str._nIn_Source_File:__s
lea edx, [ebp - 0x248]
push edx
call fcn.005b6660
add esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x248]
push ecx
call fcn.005b4690
add esp, 4
push eax
lea edx, [ebp - 0x248]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp + 0x14], 0
jle 0x4afddf
mov ecx, dword [ebp + 0x14]
push ecx
push str._nFrom_Source_Line:__d
lea edx, [ebp - 0x248]
push edx
call fcn.005b6660
add esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x248]
push ecx
call fcn.005b4690
add esp, 4
push eax
lea edx, [ebp - 0x248]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x274f
push 0x698388
push str.SetServerLockedFlagFile
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.00401f5a
mov dword [ebp - 0x40], 0
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.005b0290
mov esp, ebp
pop ebp
ret