Function at 0x10066600
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x450
mov esi, esp
mov dword [ecx], 0x1019b4e4
lea edi, [ecx + 8]
mov dword [esi + 0x1c], ecx
add ecx, 0xc
lea eax, [esi + 0x48]
mov dword [esi + 0x28], ecx
push eax
call fcn.10031f70
movzx ebx, byte [esi + 0x53]
test bl, bl
jns 0x10066642
mov ebx, dword [esi + 0x4c]
push dword [esi + 0x48]
call fcn.10145bd4
add esp, 4
mov dword [esi + 0x24], ebx
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov dword [esi + 8], edi
mov edi, dword [edi + eax + 0x1c]
lock inc dword [edi + 4]
mov ecx, 0x101be748
call fcn.10051372
mov ecx, dword [edi + 8]
mov dword [esi + 4], edi
mov edx, dword [edi + 0xc]
sub edx, ecx
sar edx, 2
cmp edx, eax
jbe 0x10066c6b
mov ebx, dword [ecx + eax*4]
test ebx, ebx
je 0x10066c6b
mov eax, dword [ebx]
mov edi, dword [eax + 0x1c]
mov ecx, edi
call dword [section..00cfg]
mov ecx, ebx
push 0xa
call edi
mov ecx, 0xffffffff
mov ebx, dword [esi + 4]
lock xadd dword [ebx + 4], ecx
test ecx, ecx
jne 0x100666bc
mov ecx, dword [ebx]
mov edi, dword [ecx + 4]
mov byte [esi + 0x18], al
mov ecx, edi
call dword [section..00cfg]
mov ecx, ebx
call edi
movzx eax, byte [esi + 0x18]
movsx eax, al
mov edi, dword [esi + 8]
mov ecx, edi
push eax
call fcn.10031830
mov ecx, edi
call fcn.10030ab0
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x14], 0xffffffff
lea eax, [esi + 0xc]
mov ecx, dword [esi + 0x28]
push eax
call fcn.10031f70
mov ecx, dword [0x101bee44]
test ecx, ecx
mov ebx, dword [esi + 0x1c]
je 0x1006679f
mov eax, esp
push eax
sub esp, 8
mov edi, esp
cmp byte [esi + 0x17], 0
mov dword [esi + 8], eax
js 0x10066725
mov eax, dword [esi + 0x14]
mov dword [edi + 8], eax
movsd xmm0, qword [esi + 0xc]
movsd qword [edi], xmm0
jmp 0x10066797
mov edx, dword [esi + 0xc]
mov dword [esi + 4], edx
mov edx, dword [esi + 0x10]
cmp edx, 0xa
mov dword [esi + 0x18], ecx
ja 0x10066740
mov byte [edi + 0xb], dl
cmp edi, dword [esi + 4]
jbe 0x10066779
jmp 0x10066786
cmp edx, 0x7ffffff0
jae 0x10066d12
mov ebx, edx
or ebx, 0xf
inc ebx
push ebx
mov dword [esi + 0x20], edx
call fcn.10145ba4
mov edx, dword [esi + 0x20]
add esp, 4
mov dword [edi], eax
or ebx, 0x80000000
mov dword [edi + 8], ebx
mov dword [edi + 4], edx
mov edi, eax
mov ebx, dword [esi + 0x1c]
cmp edi, dword [esi + 4]
ja 0x10066786
lea eax, [edi + edx]
inc eax
cmp eax, dword [esi + 4]
ja 0x10066d26
inc edx
push edx
push dword [esi + 4]
push edi
call fcn.10148eb0
add esp, 0xc
mov ecx, dword [esi + 0x18]
call fcn.100853b0
mov esp, dword [esi + 8]
test byte [0x101bb048], 0x19
jne 0x10066c2d
cmp dword [ebx + 4], 3
jne 0x10066867
test byte [0x101bee6c], 1
jne 0x10066867
mov byte [0x101bee6c], 1
mov eax, dword [0x101bee74]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x10066c70
mov ecx, dword [esi + 0x28]
lea edi, [esi + 0x48]
push edi
call fcn.10031f70
cmp byte [esi + 0x53], 0
jns 0x10066800
mov edi, dword [esi + 0x48]
add edi, dword [ebx + 0x90]
mov eax, ebx
mov ebx, dword [ebx + 0x94]
mov edx, dword [eax + 0x98]
test ebx, ebx
je 0x10066833
push 0x5c
push ebx
mov dword [esi + 8], edx
call fcn.101496c0
mov edx, dword [esi + 8]
add esp, 8
lea ecx, [eax + 1]
test eax, eax
cmove ecx, ebx
jmp 0x10066835
xor ecx, ecx
lea eax, [esi + 0x2c]
push edi
push edx
push ecx
push str._s:_d:__s
push eax
call fcn.100772f0
add esp, 0x14
cmp byte [esi + 0x53], 0
mov ebx, dword [esi + 0x1c]
js 0x1006694b
cmp byte [esi + 0x37], 0
js 0x10066960
mov byte [0x101bee6c], 0
mov eax, dword [0x101bac40]
test al, 2
je 0x10066888
cmp byte [esi + 0x17], 0
lea eax, [esi + 0xc]
jns 0x1006687c
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x101bac40]
test al, 4
jne 0x10066897
cmp dword [ebx + 4], 2
jl 0x100668e4
cmp eax, 1
ja 0x100668e4
movzx ebx, byte [esi + 0x17]
test bl, bl
cmovs ebx, dword [esi + 0x10]
lea ecx, [esi + 0xc]
cmovs ecx, dword [esi + 0xc]
mov dword [esi + 8], ecx
test ebx, ebx
je 0x100668e4
xor edi, edi
nop word cs:[eax + eax]
mov eax, ebx
sub eax, edi
mov ecx, dword [esi + 8]
add ecx, edi
push eax
push ecx
push 2
call fcn.1015f0b6
add esp, 0xc
test eax, eax
js 0x100668df
add edi, eax
cmp edi, ebx
jb 0x100668c0
mov eax, dword [0x101bac40]
test al, 1
je 0x1006691d
call fcn.10065c80
test al, al
je 0x1006691d
mov dword [esi + 0x48], 0xffffffff
movzx eax, byte [esi + 0x17]
test al, al
cmovs eax, dword [esi + 0x10]
lea ecx, [esi + 0xc]
cmovs ecx, dword [esi + 0xc]
push 0
lea edx, [esi + 0x48]
push edx
push eax
push ecx
push dword [0x101bee50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [esi + 0x1c]
cmp dword [ebx + 4], 3
jne 0x10066bba
mov edi, dword [0x101bee40]
test edi, edi
je 0x100669eb
movzx eax, byte [esi + 0x17]
test al, al
jns 0x10066970
mov eax, dword [esi + 0xc]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
jmp 0x10066976
push dword [esi + 0x48]
call fcn.10145bd4
add esp, 4
cmp byte [esi + 0x37], 0
jns 0x10066860
push dword [esi + 0x2c]
call fcn.10145bd4
add esp, 4
jmp 0x10066860
lea ecx, [esi + 0xc]
mov dword [esi + 0x20], ecx
mov ebx, dword [edi]
mov dword [esi + 0x18], eax
inc eax
mov ecx, ebx
push 0x4cf434fa
mov dword [esi + 8], eax
push eax
call fcn.10097490
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
mov dword [esi + 4], eax
je 0x100669bb
test eax, eax
mov dword [esi + 0x3c], edi
mov edi, eax
cmovne edi, dword [esi + 8]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x14]
mov dword [esi + 0x38], ecx
call dword [section..00cfg]
mov ecx, ebx
push edi
mov edi, dword [esi + 0x3c]
call dword [esi + 0x38]
mov eax, dword [esi + 4]
mov ecx, dword [edi]
push dword [esi + 8]
push 0x4cf434fa
push eax
call fcn.100972d0
test eax, eax
mov ebx, dword [esi + 0x1c]
je 0x100669eb
push dword [esi + 0x18]
push dword [esi + 0x20]
push eax
call fcn.10148eb0
add esp, 0xc
mov ecx, dword [edi]
push dword [esi + 4]
call fcn.10097620
push 0x400
push 0xff
lea eax, [esi + 0x48]
push eax
call fcn.10149430
add esp, 0xc
cmp byte [esi + 0x17], 0
jns 0x10066a0c
mov eax, dword [esi + 0xc]
jmp 0x10066a0f
lea eax, [esi + 0xc]
mov ecx, 3
nop word cs:[eax + eax]
movzx edx, byte [eax + ecx - 3]
mov byte [esi + ecx + 0x45], dl
test dl, dl
je 0x10066a65
movzx edx, byte [eax + ecx - 2]
mov byte [esi + ecx + 0x46], dl
test dl, dl
je 0x10066a65
movzx edx, byte [eax + ecx - 1]
mov byte [esi + ecx + 0x47], dl
test dl, dl
je 0x10066a65
movzx edx, byte [eax + ecx]
mov byte [esi + ecx + 0x48], dl
test dl, dl
je 0x10066a65
add ecx, 4
cmp ecx, 0x403
jne 0x10066a20
mov byte [esi + 0x447], 0
lea eax, [esi + 0x48]
push eax
call fcn.10012050
add esp, 4
mov eax, dword [0x101bee68]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x10066ca6
mov eax, dword [0x101bee60]
cmp eax, dword [0x101bee64]
je 0x10066d17
mov eax, dword [0x101bee68]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x10066cdc
mov eax, dword [0x101bee64]
test eax, eax
mov ecx, dword [0x101bee5c]
cmove eax, ecx
lea edx, [eax - 1]
cmp ecx, edx
jb 0x10066d1a
mov ecx, dword [0x101bee58]
mov ecx, dword [ecx + eax*4 - 4]
test ecx, ecx
je 0x10066bba
mov eax, 1
lock xadd dword [ecx], eax
test eax, eax
jle 0x10066d1d
cmp byte [esi + 0x17], 0
mov dword [esi + 8], ecx
jns 0x10066b10
mov ebx, dword [esi + 0xc]
jmp 0x10066b13
lea ebx, [esi + 0xc]
mov dword [esi + 4], ebx
mov edi, dword [esi + 0x24]
add ebx, edi
je 0x10066d20
push ebx
mov dword [esi + 0x18], ebx
call fcn.10163870
add esp, 4
mov edx, dword [esi + 0x1c]
mov ecx, dword [edx + 0x90]
sub edi, ecx
mov ebx, dword [esi + 4]
add ebx, ecx
mov ecx, dword [edx + 0x94]
mov dword [esi + 4], ecx
mov ecx, dword [edx + 0x98]
mov dword [esi + 0x24], ecx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], edi
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], eax
mov eax, 1
mov edi, dword [esi + 8]
lock xadd dword [edi], eax
test eax, eax
jle 0x10066d23
mov ecx, dword [edi + 4]
call dword [section..00cfg]
lea eax, [esi + 0x40]
lea edx, [esi + 0x2c]
push eax
push edx
push dword [esi + 0x24]
push dword [esi + 4]
push edi
call ecx
add esp, 0x14
lock dec dword [edi]
jne 0x10066ba3
mov ecx, dword [edi + 8]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
lock dec dword [edi]
mov ebx, dword [esi + 0x1c]
jne 0x10066bba
mov ecx, dword [edi + 8]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
cmp byte [esi + 0x17], 0
jns 0x10066bcb
push dword [esi + 0xc]
call fcn.10145bd4
add esp, 4
push dword [ebx + 0xa0]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebx + 0x9c]
call fcn.1015869e
mov dword [eax], edi
mov eax, dword [ebx + 8]
mov eax, dword [eax + 4]
mov dword [ebx + eax + 8], 0x1019c378
mov dword [ebx + 0xc], 0x1019c380
cmp byte [ebx + 0x37], 0
jns 0x10066c0a
push dword [ebx + 0x2c]
call fcn.10145bd4
add esp, 4
add ebx, 0x40
mov edi, dword [esi + 0x28]
mov ecx, edi
call fcn.1003073e
mov ecx, edi
call fcn.10012050
mov ecx, ebx
call fcn.10030734
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esi + 0x2c], ebx
lea eax, [esi + 0xc]
mov dword [esi + 0x30], eax
mov dword [esi + 0x4c], 0
mov dword [esi + 0x48], 0
sub esp, 8
movsd xmm0, qword [esi + 0x48]
movsd qword [esp], xmm0
lea ecx, [esi + 0x2c]
call fcn.100672e0
add esp, 8
cmp dword [ebx + 4], 3
je 0x100667b6
jmp 0x10066867
call fcn.100330c3
push 0x101bee74
call fcn.10145c47
add esp, 4
cmp dword [0x101bee74], 0xffffffff
jne 0x100667eb
mov dword [0x101bee70], 0
push 0x101bee74
call fcn.10145cbd
add esp, 4
jmp 0x100667eb
push 0x101bee68
call fcn.10145c47
add esp, 4
cmp dword [0x101bee68], 0xffffffff
jne 0x10066a92
xorps xmm0, xmm0
movups xmmword [0x101bee58], xmm0
push 0x101bee68
call fcn.10145cbd
add esp, 4
jmp 0x10066a92
push 0x101bee68
call fcn.10145c47
add esp, 4
cmp dword [0x101bee68], 0xffffffff
jne 0x10066ac4
xorps xmm0, xmm0
movups xmmword [0x101bee58], xmm0
push 0x101bee68
call fcn.10145cbd
add esp, 4
jmp 0x10066ac4
call fcn.1015b4f0
int3
int3
int3
int3
int3
int3