Function at 0x1c6c7f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x434
mov eax, dword [ecx + 0x3c]
test al, 0x10
mov dword [ebp - 0x10], ecx
je 0x1c6cdc2
mov ebx, ecx
mov eax, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x38]
cmp ecx, eax
jae 0x1c6c81b
mov dword [ebx + 0x38], eax
mov ecx, eax
mov edi, dword [ebx + 0x20]
sub ecx, edi
js 0x1c6cda1
cmp ecx, 0x7ffffff8
jae 0x1c6cda4
cmp ecx, 0xb
jae 0x1c6c848
lea esi, [ebp - 0x440]
mov byte [esi + 0xb], cl
test ecx, ecx
jne 0x1c6c878
xor eax, eax
jmp 0x1c6c887
mov ebx, ecx
or ebx, 7
inc ebx
push ebx
mov esi, ecx
call fcn.01c9515a
mov ecx, esi
add esp, 4
mov esi, eax
mov dword [ebp - 0x440], eax
or ebx, 0x80000000
mov dword [ebp - 0x438], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x43c], ecx
push ecx
push edi
push esi
mov edi, ecx
call fcn.01c994a0
mov eax, edi
add esp, 0xc
lea edi, [ebx + 8]
mov byte [esi + eax], 0
movzx eax, byte [ebp - 0x435]
test al, al
jns 0x1c6c89f
mov eax, dword [ebp - 0x43c]
mov dword [ebp - 0x30], eax
jns 0x1c6c8b2
push dword [ebp - 0x440]
call fcn.01c95155
add esp, 4
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov esi, dword [edi + eax + 0x1c]
cmp esi, 0x1cf7724
jne 0x1c6cda7
mov dword [ebp - 0x14], edi
mov eax, dword [0x1cf7dd0]
cmp eax, 0xffffffff
jne 0x1c6ce3d
mov eax, dword [0x1cf7dd4]
lea edx, [eax - 1]
mov ecx, dword [esi + 8]
mov edi, dword [esi + 0xc]
sub edi, ecx
sar edi, 2
cmp edi, edx
jbe 0x1c6cd9e
mov ebx, dword [ecx + eax*4 - 4]
test ebx, ebx
je 0x1c6cd9e
mov eax, dword [ebx]
mov edi, dword [eax + 0x1c]
mov ecx, edi
call dword [0x1cef298]
mov ecx, ebx
push 0xa
call edi
mov ebx, eax
cmp esi, 0x1cf7724
jne 0x1c6ce17
movsx eax, bl
mov esi, dword [ebp - 0x14]
mov ecx, esi
push eax
call fcn.01c46d60
mov ecx, esi
call fcn.01c2d350
xor eax, eax
dec eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x3c]
test al, 0x10
je 0x1c6cdee
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x38]
cmp ecx, eax
jae 0x1c6c95e
mov dword [ebx + 0x38], eax
mov ecx, eax
mov esi, dword [ebx + 0x20]
sub ecx, esi
js 0x1c6cdb0
cmp ecx, 0x7ffffff8
jae 0x1c6cdb3
cmp ecx, 0xb
jae 0x1c6c988
lea edi, [ebp - 0x20]
mov byte [edi + 0xb], cl
test ecx, ecx
jne 0x1c6c9af
xor eax, eax
jmp 0x1c6c9be
mov ebx, ecx
or ebx, 7
inc ebx
push ebx
mov edi, ecx
call fcn.01c9515a
mov ecx, edi
add esp, 4
mov edi, eax
mov dword [ebp - 0x20], eax
or ebx, 0x80000000
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
push ecx
push esi
push edi
mov esi, ecx
call fcn.01c994a0
mov eax, esi
add esp, 0xc
mov byte [edi + eax], 0
mov edx, dword [ebx + 0x90]
movzx ecx, byte [ebp - 0x15]
mov eax, ecx
test cl, cl
jns 0x1c6c9d5
mov eax, dword [ebp - 0x1c]
mov esi, eax
sub esi, edx
mov dword [ebp - 0x14], esi
jb 0x1c6cdb6
test cl, cl
js 0x1c6c9eb
lea esi, [ebp - 0x20]
jmp 0x1c6c9ee
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x7ffffff8
jae 0x1c6cdb9
cmp ecx, 0xb
jae 0x1c6ca0e
lea edi, [ebp - 0x2c]
mov byte [edi + 0xb], cl
cmp eax, edx
jne 0x1c6ca38
jmp 0x1c6ca48
mov ebx, ecx
or ebx, 7
inc ebx
push ebx
mov edi, edx
call fcn.01c9515a
mov ecx, dword [ebp - 0x14]
mov edx, edi
add esp, 4
mov edi, eax
mov dword [ebp - 0x2c], eax
or ebx, 0x80000000
mov dword [ebp - 0x24], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
add esi, edx
push ecx
push esi
push edi
call fcn.01c994a0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
mov byte [edi + ecx], 0
mov eax, dword [ebx + 0x94]
mov ecx, dword [ebx + 0x98]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0x56
mov al, byte [0x1cf8d16]
test al, al
jne 0x1c6ccdf
cmp byte [ebp - 0x21], 0
jns 0x1c6ca83
push dword [ebp - 0x2c]
call fcn.01c95155
add esp, 4
mov eax, dword [ebx + 4]
cmp eax, 3
jne 0x1c6cb25
test byte [0x1cf8e44], 1
jne 0x1c6cb25
mov byte [0x1cf8e44], 1
mov eax, dword [0x1cf8e4c]
mov ecx, dword [0x1cf656c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x1c6cd14
lea esi, [ebp - 0x440]
mov ecx, ebx
push esi
call fcn.01cd2770
mov eax, dword [0x1cf8e48]
test eax, eax
je 0x1c6cb04
mov ecx, dword [0x1cf8e50]
test ecx, ecx
je 0x1c6cb04
movzx edx, byte [ebp - 0x435]
test dl, dl
jns 0x1c6cafc
mov esi, dword [ebp - 0x440]
mov edx, dword [ebp - 0x43c]
push edx
push esi
push eax
call fcn.01c330e0
cmp byte [ebp - 0x435], 0
jns 0x1c6cb1b
push dword [ebp - 0x440]
call fcn.01c95155
add esp, 4
mov byte [0x1cf8e44], 0
mov eax, dword [ebx + 4]
cmp eax, 2
jl 0x1c6cb5d
lea esi, [ebp - 0x20]
movzx ebx, byte [esi + 0xb]
test bl, bl
cmovs ebx, dword [esi + 4]
cmovs esi, dword [esi]
test ebx, ebx
je 0x1c6cb5d
xor edi, edi
mov eax, ebx
sub eax, edi
lea ecx, [esi + edi]
push eax
push ecx
push 2
call fcn.01caa65d
add esp, 0xc
test eax, eax
js 0x1c6cb5d
add edi, eax
cmp edi, ebx
jb 0x1c6cb40
call fcn.01cd24d0
test al, al
je 0x1c6cb93
lea ecx, [ebp - 0x440]
lea eax, [ebp - 0x20]
movzx edx, byte [eax + 0xb]
test dl, dl
cmovs edx, dword [eax + 4]
mov dword [ecx], 0xffffffff
cmovs eax, dword [eax]
push 0
push ecx
push edx
push eax
push dword [0x1cf8e2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x10]
cmp dword [eax + 4], 3
jne 0x1c6cc34
lea esi, [ebp - 0x440]
push 0x400
push 0xff
push esi
call fcn.01c99a20
add esp, 0xc
cmp byte [ebp - 0x15], 0
js 0x1c6cbc4
lea eax, [ebp - 0x20]
jmp 0x1c6cbc7
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov dl, byte [eax + ecx]
mov byte [ebp + ecx - 0x440], dl
test dl, dl
je 0x1c6cbe4
inc ecx
cmp ecx, 0x400
jne 0x1c6cbc9
mov byte [ebp - 0x41], 0
push esi
call fcn.01c7aa50
add esp, 4
call fcn.01cd2720
mov eax, dword [0x1cf8e38]
cmp eax, dword [0x1cf8e3c]
je 0x1c6cdbc
call fcn.01cd2720
mov eax, dword [0x1cf8e3c]
test eax, eax
mov ecx, dword [0x1cf8e34]
cmove eax, ecx
lea edx, [eax - 1]
cmp ecx, edx
jb 0x1c6cdbf
mov ecx, dword [0x1cf8e30]
mov eax, dword [ecx + eax*4 - 4]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x1c6cc50
cmp byte [ebp - 0x15], 0
jns 0x1c6cc45
push dword [ebp - 0x20]
call fcn.01c95155
add esp, 4
add esp, 0x434
pop esi
pop edi
pop ebx
pop ebp
ret
xor ecx, ecx
inc ecx
lock xadd dword [eax], ecx
test ecx, ecx
jle 0x1c6cea8
cmp ecx, 0x7fffffff
mov edi, dword [ebp - 0x30]
je 0x1c6ceab
cmp byte [ebp - 0x15], 0
js 0x1c6cc79
lea ebx, [ebp - 0x20]
jmp 0x1c6cc7c
mov ebx, dword [ebp - 0x20]
lea ecx, [ebx + edi]
mov dword [ebp - 0x14], ecx
push ecx
call fcn.01cad760
add esp, 4
mov esi, dword [ebp - 0x10]
mov ecx, dword [esi + 0x90]
sub edi, ecx
add ebx, ecx
mov edx, dword [esi + 0x94]
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x14]
push edi
push ebx
push dword [esi + 0x98]
call fcn.01cd2820
add esp, 0x14
lea eax, [ebp - 0x2c]
mov esi, dword [eax]
test esi, esi
je 0x1c6cc34
lock dec dword [esi]
jne 0x1c6cc34
mov ecx, dword [esi + 8]
call dword [0x1cef298]
push esi
call ecx
add esp, 4
jmp 0x1c6cc34
movzx ecx, al
lea eax, [ebp - 0x38]
lea esi, [ebp - 0x440]
mov dword [esi], eax
lea eax, [ebp - 0x3c]
mov dword [esi + 4], eax
lea eax, [ebp - 0x2c]
mov dword [esi + 8], eax
lea eax, [ebp - 0x40]
mov dword [eax], str.LogMessage
lea edx, [ebp - 0x34]
push esi
push eax
call fcn.01cd2980
add esp, 8
jmp 0x1c6ca72
push 0x1cf8e4c
call fcn.01c9518a
add esp, 4
cmp dword [0x1cf8e4c], 0xffffffff
jne 0x1c6cac4
cmp dword [0x1cf8e50], 0
je 0x1c6ceae
push 0x41c
call fcn.01c9515a
add esp, 4
mov edi, eax
mov eax, str.LOG_FATAL
mov dword [edi], eax
mov dword [edi + 4], 0x400
lea ecx, [edi + 0x1c]
xor edx, edx
mov dword [edi + 8], edx
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], edx
mov word [edi + 0x18], 1
mov eax, edi
add eax, 0x1a
push 0x402
push edx
push eax
call fcn.01c99a20
add esp, 0xc
mov dword [0x1cf8e48], edi
push 0x1cf8e4c
call fcn.01c951d9
add esp, 4
mov ebx, dword [ebp - 0x10]
jmp 0x1c6cac4
int3
int3
int3
lock inc dword [esi + 4]
jmp 0x1c6c8c7
int3
int3
int3
int3
int3
int3
test al, 8
jne 0x1c6cdda
lea esi, [ebp - 0x440]
mov byte [esi + 0xb], 0
xor eax, eax
mov ebx, dword [ebp - 0x10]
jmp 0x1c6c887
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x1c]
sub ecx, edi
jns 0x1c6c826
int3
test al, 8
jne 0x1c6ce03
lea edi, [ebp - 0x20]
mov byte [edi + 0xb], 0
xor eax, eax
mov ebx, dword [ebp - 0x10]
jmp 0x1c6c9be
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x1c]
sub ecx, esi
jns 0x1c6c969
int3
xor eax, eax
dec eax
lock xadd dword [esi + 4], eax
test eax, eax
jne 0x1c6c920
mov eax, dword [esi]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x1cef298]
mov ecx, esi
call edi
jmp 0x1c6c920
push 0x1cf725c
call dword [sym.imp.progwrp.dll_AcquireSRWLockExclusive]
mov eax, dword [0x1cf7dd0]
cmp eax, 1
je 0x1c6cec5
mov eax, dword [0x1cf7dd0]
test eax, eax
jne 0x1c6ceb5
mov dword [0x1cf7dd0], 1
mov edi, 0x1cf725c
mov ebx, dword [sym.imp.progwrp.dll_ReleaseSRWLockExclusive]
push edi
call ebx
xor eax, eax
inc eax
lock xadd dword [0x1cf77d0], eax
inc eax
mov dword [0x1cf7dd4], eax
push edi
call dword [sym.imp.progwrp.dll_AcquireSRWLockExclusive]
mov dword [0x1cf7dd0], 0xffffffff
push edi
call ebx
push 0x1cf7260
call dword [sym.imp.progwrp.dll_WakeAllConditionVariable]
jmp 0x1c6c8d8
int3
int3
xor edi, edi
jmp 0x1c6cd83
push 0x1cf725c
call dword [sym.imp.progwrp.dll_ReleaseSRWLockExclusive]
jmp 0x1c6c8d8
mov edi, dword [sym.imp.progwrp.dll_SleepConditionVariableSRW]
push 0
push 0xffffffffffffffff
push 0x1cf725c
push 0x1cf7260
call edi
mov eax, dword [0x1cf7dd0]
cmp eax, 1
jne 0x1c6ce52
jmp 0x1c6cecb