Function at 0x49dac0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5422a8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5bc684]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], str.LogFile::WriteStringArg
cmp dword [esi + 0x38], 0
je 0x49dd66
mov dword [ebp - 4], 0
mov eax, dword [0x5bbfe4]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x14]
push eax
mov ecx, esi
call fcn.0049c260
test eax, eax
je 0x49dc26
mov ebx, 1
cmp dword [esi + 8], ebx
jne 0x49dc3e
cmp dword [esi + 0x18], 0
je 0x49dc3e
cmp dword [esi + 0xc], 0
je 0x49dc3e
lea ecx, [esi + 0x268]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 2
push 0x560e54
lea ecx, [ebp - 0x14]
call fcn.004bfd50
mov edx, dword [ebp - 0x14]
mov eax, dword [edx - 8]
inc eax
push eax
call fcn.004fc6be
add esp, 4
mov dword [ebp + 0x18], eax
mov ecx, dword [ebp - 0x14]
mov edx, eax
mov al, byte [ecx]
mov byte [edx], al
add ecx, ebx
add edx, ebx
test al, al
jne 0x49db93
lea eax, [ebp + 0x18]
push eax
lea ecx, [esi + 0x1c]
call fcn.0049cd30
mov ecx, dword [esi + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [ebp - 4], ebx
jmp 0x49dbca
lea edx, [esi + 0x268]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 4
mov eax, dword [esi + 0x288]
test eax, eax
je 0x49dc00
mov ecx, dword [ebp - 0x14]
push ecx
push 0x56e1b4
call eax
add esp, 8
mov dword [ebp - 4], 1
jmp 0x49dc19
lea edx, [esi + 0x250]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004bfa40
mov dword [ebp - 4], 0xffffffff
jmp 0x49dd38
lea eax, [esi + 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 6
call fcn.0049b800
push 0
push 2
push 4
push 0
push 3
push 0xc0000000
lea ecx, [esi + 0x14c]
push ecx
call dword [0x5c1f8c]
mov edi, eax
cmp edi, 0xffffffff
je 0x49dcf1
mov edx, dword [ebp - 0x14]
mov ebx, dword [edx - 8]
push 0x560e54
lea ecx, [ebp - 0x14]
call fcn.004bfd50
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 8]
push 0
lea edx, [ebp + 0x18]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push ebx
lea ecx, [ebp - 0x14]
call fcn.004c0980
cmp dword [esi + 0x3c], 0
je 0x49dcc6
push edi
call fcn.0049d520
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x288]
test eax, eax
je 0x49dcff
mov ecx, dword [ebp - 0x14]
push ecx
push 0x56e1b4
call eax
add esp, 8
mov dword [ebp - 4], 1
jmp 0x49dc19
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x49dcff
mov dword [esi + 0x40], ebx
mov dword [ebp - 4], 1
jmp 0x49dc19
mov dword [ebp - 4], 9
inc dword [esi + 0x284]
cmp dword [esi + 0x284], 0xa
jbe 0x49dd5f
mov dword [esi + 0x284], 0
mov ecx, esi
call fcn.0049d9b0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14