Function at 0x471070
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, 0x440
mov esi, ecx
mov dword [ecx], 0x57af88
lea edi, [ecx + 8]
add ecx, 0xc
lea eax, [esp + 0x3c]
mov dword [esp + 0x24], ecx
push eax
call fcn.0042ba50
movzx ebx, byte [esp + 0x47]
test bl, bl
jns 0x4710b4
mov ebx, dword [esp + 0x40]
push dword [esp + 0x3c]
call fcn.00528424
add esp, 4
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], esi
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], edi
mov edi, dword [edi + eax + 0x1c]
lock inc dword [edi + 4]
mov ecx, 0x59c288
call fcn.00448bd2
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
sub edx, ecx
sar edx, 2
cmp edx, eax
jbe 0x471681
mov esi, dword [ecx + eax*4]
test esi, esi
je 0x471681
mov eax, dword [esi]
mov ebx, dword [eax + 0x1c]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
push 0xa
call ebx
mov ebx, eax
mov eax, 0xffffffff
lock xadd dword [edi + 4], eax
test eax, eax
jne 0x471129
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [section..00cfg]
mov ecx, edi
call esi
movsx eax, bl
mov esi, dword [esp + 0x10]
mov ecx, esi
push eax
call fcn.0042b340
mov ecx, esi
call fcn.0042a7d0
mov dword [esp + 4], 0xffffffff
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0xc], 0xffffffff
lea esi, [esp + 4]
mov ecx, dword [esp + 0x24]
push esi
call fcn.0042ba50
movzx ecx, byte [esp + 0xf]
mov edx, ecx
test cl, cl
mov ebx, dword [esp + 0x14]
jns 0x471178
mov edx, dword [esp + 8]
mov eax, dword [ebx + 0x90]
cmp edx, eax
jb 0x47172d
test cl, cl
jns 0x47118e
mov esi, dword [esp + 4]
add esi, eax
sub edx, eax
je 0x47119c
test esi, esi
je 0x471730
cmp edx, 0x7ffffff0
jae 0x471686
cmp edx, 0xa
ja 0x4711bb
mov byte [esp + 0x23], dl
lea edi, [esp + 0x18]
cmp edi, esi
jbe 0x4711ea
jmp 0x4711f5
mov ebx, edx
or ebx, 0xf
inc ebx
push ebx
mov edi, edx
call fcn.005283f4
mov edx, edi
add esp, 4
mov edi, eax
mov dword [esp + 0x18], eax
or ebx, 0x80000000
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
cmp edi, esi
ja 0x4711f5
lea eax, [edi + edx]
cmp eax, esi
ja 0x471733
push edx
push esi
push edi
mov esi, edx
call fcn.0052bc90
add esp, 0xc
mov byte [edi + esi], 0
mov eax, dword [ebx + 0x94]
mov ecx, dword [ebx + 0x98]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
test byte [0x598e94], 0x19
jne 0x47163a
cmp byte [esp + 0x23], 0
lea esi, [esp + 0x3c]
jns 0x47123e
push dword [esp + 0x18]
call fcn.00528424
add esp, 4
cmp dword [ebx + 4], 3
jne 0x4712f8
test byte [0x59d930], 1
jne 0x4712f8
mov byte [0x59d930], 1
mov eax, dword [0x59d938]
mov ecx, dword [0x59b038]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x47168b
mov ecx, dword [esp + 0x24]
push esi
call fcn.0042ba50
cmp byte [esp + 0x47], 0
jns 0x471292
mov esi, dword [esp + 0x3c]
add esi, dword [ebx + 0x90]
mov dword [esp + 0x10], esi
mov edi, dword [ebx + 0x94]
mov esi, dword [ebx + 0x98]
test edi, edi
je 0x4712c1
push 0x5c
push edi
call fcn.0052c4a0
add esp, 8
lea ecx, [eax + 1]
test eax, eax
cmove ecx, edi
jmp 0x4712c3
xor ecx, ecx
lea eax, [esp + 0x18]
push dword [esp + 0x10]
push esi
push ecx
push str._s:_d:__s
push eax
call fcn.00465c20
add esp, 0x14
cmp byte [esp + 0x47], 0
js 0x4714ec
cmp byte [esp + 0x23], 0
js 0x471503
mov byte [0x59d930], 0
mov eax, dword [0x599b48]
test al, 2
je 0x47131e
cmp byte [esp + 0xf], 0
jns 0x47130e
mov eax, dword [esp + 4]
jmp 0x471312
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x599b48]
test al, 4
jne 0x47132d
cmp dword [ebx + 4], 2
jl 0x471372
cmp eax, 1
ja 0x471372
movzx ebx, byte [esp + 0xf]
test bl, bl
cmovs ebx, dword [esp + 8]
lea esi, [esp + 4]
cmovs esi, dword [esp + 4]
test ebx, ebx
je 0x471372
xor edi, edi
nop dword [eax + eax]
mov eax, ebx
sub eax, edi
lea ecx, [esi + edi]
push eax
push ecx
push 2
call fcn.0053eb06
add esp, 0xc
test eax, eax
js 0x47136d
add edi, eax
cmp edi, ebx
jb 0x471350
mov eax, dword [0x599b48]
test al, 1
je 0x4713b1
call fcn.004706d0
test al, al
je 0x4713b1
mov dword [esp + 0x3c], 0xffffffff
movzx eax, byte [esp + 0xf]
test al, al
cmovs eax, dword [esp + 8]
lea ecx, [esp + 4]
cmovs ecx, dword [esp + 4]
lea edx, [esp + 0x3c]
push 0
push edx
push eax
push ecx
push dword [0x59d914]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x14]
cmp dword [edi + 4], 3
jne 0x4715c4
lea esi, [esp + 0x3c]
push 0x400
push 0xff
push esi
call fcn.0052c210
add esp, 0xc
cmp byte [esp + 0xf], 0
jns 0x4713e3
mov eax, dword [esp + 4]
jmp 0x4713e7
lea eax, [esp + 4]
mov ecx, 3
nop dword [eax]
movzx edx, byte [eax + ecx - 3]
mov byte [esp + ecx + 0x39], dl
test dl, dl
je 0x471436
movzx edx, byte [eax + ecx - 2]
mov byte [esp + ecx + 0x3a], dl
test dl, dl
je 0x471436
movzx edx, byte [eax + ecx - 1]
mov byte [esp + ecx + 0x3b], dl
test dl, dl
je 0x471436
movzx edx, byte [eax + ecx]
mov byte [esp + ecx + 0x3c], dl
test dl, dl
je 0x471436
add ecx, 4
cmp ecx, 0x403
jne 0x4713f0
mov byte [esp + 0x43b], 0
push esi
call fcn.0042a7c0
add esp, 4
mov eax, dword [0x59d92c]
mov ecx, dword [0x59b038]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4716c1
mov eax, dword [0x59d924]
cmp eax, dword [0x59d928]
je 0x471736
mov eax, dword [0x59d92c]
mov ecx, dword [0x59b038]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4716f7
mov eax, dword [0x59d928]
test eax, eax
mov ecx, dword [0x59d920]
cmove eax, ecx
lea edx, [eax - 1]
cmp ecx, edx
jb 0x471739
mov ecx, dword [0x59d91c]
mov ecx, dword [ecx + eax*4 - 4]
test ecx, ecx
je 0x4715c4
mov eax, 1
lock xadd dword [ecx], eax
test eax, eax
jle 0x47173c
cmp eax, 0x7fffffff
je 0x47173f
cmp byte [esp + 0xf], 0
mov dword [esp + 0x10], ecx
jns 0x471514
mov ebx, dword [esp + 4]
jmp 0x471518
push dword [esp + 0x3c]
call fcn.00528424
add esp, 4
cmp byte [esp + 0x23], 0
jns 0x4712f1
push dword [esp + 0x18]
call fcn.00528424
add esp, 4
jmp 0x4712f1
lea ebx, [esp + 4]
mov edi, ebx
mov esi, dword [esp + 0x30]
add edi, esi
je 0x471742
push edi
call fcn.005429e0
add esp, 4
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + 0x90]
sub esi, ecx
add ebx, ecx
mov ecx, dword [edx + 0x94]
mov edx, dword [edx + 0x98]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
mov eax, 1
mov esi, dword [esp + 0x10]
lock xadd dword [esi], eax
test eax, eax
jle 0x471745
cmp eax, 0x7fffffff
je 0x471748
mov ebx, edx
mov edi, ecx
mov ecx, dword [esi + 4]
call dword [section..00cfg]
lea eax, [esp + 0x28]
lea edx, [esp + 0x18]
push eax
push edx
push ebx
push edi
push esi
call ecx
add esp, 0x14
lock dec dword [esi]
mov edi, dword [esp + 0x14]
jne 0x4715b0
mov ecx, dword [esi + 8]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
lock dec dword [esi]
jne 0x4715c4
mov ecx, dword [esi + 8]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
cmp byte [esp + 0xf], 0
jns 0x4715d7
push dword [esp + 4]
call fcn.00528424
add esp, 4
push dword [edi + 0xa0]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [edi + 0x9c]
call fcn.00539d2c
mov dword [eax], esi
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov dword [edi + eax + 8], 0x57bce8
mov dword [edi + 0xc], 0x57bcf0
cmp byte [edi + 0x37], 0
jns 0x471616
push dword [edi + 0x2c]
call fcn.00528424
add esp, 4
add edi, 0x40
mov esi, dword [esp + 0x24]
mov ecx, esi
call fcn.0042a48a
mov ecx, esi
call fcn.0042a7c0
mov ecx, edi
call fcn.0042a480
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0x34]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x44], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
sub esp, 8
movsd xmm0, qword [esp + 0x30]
movsd qword [esp], xmm0
lea ecx, [esp + 0x44]
call fcn.00471d90
add esp, 8
jmp 0x471227
call fcn.0042bf1b
call fcn.0053bf0b
push 0x59d938
call fcn.00528497
add esp, 4
cmp dword [0x59d938], 0xffffffff
jne 0x47127d
mov dword [0x59d934], 0
push 0x59d938
call fcn.0052850d
add esp, 4
jmp 0x47127d
push 0x59d92c
call fcn.00528497
add esp, 4
cmp dword [0x59d92c], 0xffffffff
jne 0x471460
xorps xmm0, xmm0
movups xmmword [0x59d91c], xmm0
push 0x59d92c
call fcn.0052850d
add esp, 4
jmp 0x471460
push 0x59d92c
call fcn.00528497
add esp, 4
cmp dword [0x59d92c], 0xffffffff
jne 0x471492
xorps xmm0, xmm0
movups xmmword [0x59d91c], xmm0
push 0x59d92c
call fcn.0052850d
add esp, 4
jmp 0x471492
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3