Function at 0x475846
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x5f2e68]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor ebx, ebx
push 0x31
mov dword [ebp - 0x24c], eax
lea eax, [ebp - 0x3b]
push ebx
push eax
mov esi, ecx
mov dword [ebp - 0x248], ebx
mov byte [ebp - 0x3c], bl
call fcn.005306b0
add esp, 0xc
push 0xff
lea eax, [ebp - 0x13b]
push ebx
push eax
mov byte [ebp - 0x13c], bl
call fcn.005306b0
add esp, 0xc
push 0x103
lea eax, [ebp - 0x243]
push ebx
push eax
mov byte [ebp - 0x244], bl
call fcn.005306b0
add esp, 0xc
mov edx, esi
call fcn.004ccc0d
test eax, eax
je 0x4758c9
xor eax, eax
jmp 0x475a8f
push esi
lea edi, [ebp - 0x244]
call fcn.00470e3d
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
pop ecx
push ebx
mov edi, SQLGetDiagRec
push edi
push 1
push ebx
push 7
push 6
lea eax, [ebp - 0x244]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x254], eax
jne 0x475978
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push edi
push 4
push ebx
push 7
mov dword [ebp - 0x250], eax
push 6
lea eax, [ebp - 0x244]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x254], eax
jne 0x475978
call fcn.004fa8e4
sub eax, dword [0x6f1828]
cmp eax, 0xea60
ja 0x475942
call fcn.004187ab
test eax, eax
jne 0x4758c2
call fcn.004fa8e4
mov dword [0x6f1828], eax
mov eax, str._GetLastError_
push eax
push dword [ebp - 0x250]
push eax
push dword [ebp - 0x250]
lea eax, [ebp - 0x244]
push eax
push str.:3:SetServerLockedFlagFile___FAILED:_10min:_CreateFile___s___FAILED:_GetLastError___should_be___ld:__s_ld:_Second_Error:__s
call fcn.0042bd38
add esp, 0x18
jmp 0x4758c2
push 0x32
lea eax, [ebp - 0x3c]
call fcn.0046b1e5
cmp dword [ebp + 8], ebx
pop ecx
je 0x475999
push 0x552e64
push 0x32
pop eax
lea esi, [ebp - 0x3c]
call fcn.004ccd0f
pop ecx
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x13c]
push str._nLock_was_initiated_by:__s
push eax
call fcn.00531b2f
add esp, 0xc
push ebx
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x13c]
push eax
call fcn.00530f70
mov edi, dword [ebp - 0x254]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
pop ecx
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
call esi
test eax, eax
jne 0x475a02
mov eax, dword [0x6f1824]
inc dword [0x6f1824]
cmp eax, 0xa
jae 0x475a02
push str._GetLastError_
push str.:7:SetServerLockedFlagFile___FAILED:_WriteFile___FAILED:__s
call fcn.0042b70b
pop ecx
pop ecx
mov edx, dword [ebp - 0x24c]
call fcn.004ccc0d
test eax, eax
jne 0x475a4b
push dword [ebp - 0x24c]
lea eax, [ebp - 0x13c]
push str._nIn_Source_File:__s
push eax
call fcn.00531b2f
add esp, 0xc
push ebx
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x13c]
push eax
call fcn.00530f70
pop ecx
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
call esi
cmp dword [ebp + 0x10], ebx
jle 0x475a87
push dword [ebp + 0x10]
lea eax, [ebp - 0x13c]
push str._nFrom_Source_Line:__d
push eax
call fcn.00531b2f
add esp, 0xc
push ebx
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x13c]
push eax
call fcn.00530f70
pop ecx
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
call esi
call fcn.00435716
xor eax, eax
inc eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret