Function at 0x485d70
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 eax, dword [0x575010]
xor eax, ebp
mov dword [esp + 0x438], eax
mov dword [ecx], 0x55833c
lea eax, [ecx + 8]
mov dword [esp + 4], eax
add ecx, 0xc
lea edi, [esp + 0x38]
mov dword [esp + 0xc], ecx
push edi
call fcn.0042bb70
movzx ebx, byte [esp + 0x43]
test bl, bl
jns 0x485dc6
mov ebx, dword [esp + 0x3c]
push dword [esp + 0x38]
call fcn.00507dc6
add esp, 4
mov dword [esp + 8], ebx
mov dword [esp], esi
mov eax, dword [esi + 8]
mov ecx, dword [eax + 4]
add ecx, dword [esp + 4]
push edi
call fcn.0044ddaa
mov ecx, edi
push 0x57a434
call fcn.00460ca8
mov edi, eax
mov eax, dword [eax]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [section..00cfg]
mov ecx, edi
push 0xa
call esi
mov ebx, eax
lea ecx, [esp + 0x38]
call fcn.0044fcf2
movsx eax, bl
mov esi, dword [esp + 4]
mov ecx, esi
push eax
call fcn.0042b430
mov ecx, esi
call fcn.0042a690
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x18], 0xffffffff
lea esi, [esp + 0x10]
mov ebx, dword [esp + 0xc]
mov ecx, ebx
push esi
call fcn.0042bb70
movzx ecx, byte [esp + 0x1b]
mov eax, ecx
test cl, cl
jns 0x485e56
mov eax, dword [esp + 0x14]
mov edi, dword [esp]
mov edx, dword [edi + 0x90]
sub eax, edx
jb 0x4863cd
js 0x4863d0
test cl, cl
jns 0x485e75
mov esi, dword [esp + 0x10]
add esi, edx
lea ecx, [esp + 0x24]
push eax
push esi
call fcn.0042f42c
mov eax, dword [edi + 0x94]
mov ecx, dword [edi + 0x98]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
test byte [0x576fac], 0x19
jne 0x485eb1
cmp byte [esp + 0x2f], 0
js 0x485eff
cmp dword [edi + 4], 3
je 0x485f15
jmp 0x485ff6
lea eax, [esp + 0x1c]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
sub esp, 8
movsd xmm0, qword [esp + 0x38]
movsd qword [esp], xmm0
lea edx, [esp + 0x40]
mov ecx, str.LogMessage
call fcn.004867e0
add esp, 8
cmp byte [esp + 0x2f], 0
jns 0x485ea6
push dword [esp + 0x24]
call fcn.00507dc6
add esp, 4
cmp dword [edi + 4], 3
jne 0x485ff6
cmp byte [0x57aea4], 0
jne 0x485ff6
mov byte [0x57aea4], 1
mov eax, dword [0x57aeac]
mov ecx, dword [0x579028]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x48631e
mov ecx, ebx
lea esi, [esp + 0x38]
push esi
call fcn.0042bb70
cmp byte [esp + 0x43], 0
jns 0x485f61
mov esi, dword [esp + 0x38]
add esi, dword [edi + 0x90]
mov ebx, dword [edi + 0x94]
mov edi, dword [edi + 0x98]
test ebx, ebx
je 0x485f8c
push 0x5c
push ebx
call fcn.0050bdd0
add esp, 8
lea ecx, [eax + 1]
test eax, eax
cmove ecx, ebx
jmp 0x485f8e
xor ecx, ecx
push esi
push edi
push ecx
push str._s:_d:__s
lea esi, [esp + 0x34]
push esi
call fcn.0047ac00
add esp, 0x14
cmp byte [esp + 0x43], 0
jns 0x485fb6
push dword [esp + 0x38]
call fcn.00507dc6
add esp, 4
movzx eax, byte [esp + 0x2f]
mov ecx, esi
test al, al
mov edi, dword [esp]
jns 0x485fcc
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
push eax
push ecx
push dword [0x57aea8]
call fcn.00477710
add esp, 0xc
cmp byte [esp + 0x2f], 0
jns 0x485fef
push dword [esp + 0x24]
call fcn.00507dc6
add esp, 4
mov byte [0x57aea4], 0
mov ecx, dword [0x57ae7c]
test ecx, ecx
je 0x486049
mov eax, dword [edi + 4]
mov dword [esp + 4], eax
mov eax, dword [esp]
mov edi, dword [eax + 0x90]
mov eax, dword [esp]
mov ebx, dword [eax + 0x98]
mov eax, dword [esp]
mov esi, dword [eax + 0x94]
call dword [section..00cfg]
lea eax, [esp + 0x10]
push eax
push edi
mov edi, dword [esp + 8]
push ebx
mov ebx, dword [esp + 0x18]
push esi
push dword [esp + 0x14]
call ecx
add esp, 0x14
test al, al
jne 0x4862ac
mov eax, dword [0x577cd0]
test al, 2
je 0x48606f
cmp byte [esp + 0x1b], 0
jns 0x48605f
mov eax, dword [esp + 0x10]
jmp 0x486063
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x577cd0]
test al, 4
jne 0x48607e
cmp dword [edi + 4], 2
jl 0x4860c5
cmp eax, 1
ja 0x4860c5
movzx ebx, byte [esp + 0x1b]
test bl, bl
cmovs ebx, dword [esp + 0x14]
lea esi, [esp + 0x10]
cmovs esi, dword [esp + 0x10]
test ebx, ebx
je 0x4860c5
xor edi, edi
nop dword [eax]
mov eax, ebx
sub eax, edi
lea ecx, [esi + edi]
push eax
push ecx
push 2
call fcn.0051d450
add esp, 0xc
test eax, eax
js 0x4860bd
add edi, eax
cmp edi, ebx
jb 0x4860a0
mov eax, dword [0x577cd0]
mov edi, dword [esp]
test al, 1
je 0x486104
call fcn.00485660
test al, al
je 0x486104
mov dword [esp + 0x38], 0xffffffff
movzx eax, byte [esp + 0x1b]
test al, al
cmovs eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
cmovs ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
push dword [0x57ae88]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [edi + 4], 3
mov ebx, dword [esp + 0xc]
jne 0x4862ac
push 0x400
push 0xff
lea eax, [esp + 0x40]
push eax
call fcn.0050bb40
add esp, 0xc
cmp byte [esp + 0x1b], 0
jns 0x486136
mov eax, dword [esp + 0x10]
jmp 0x48613a
lea eax, [esp + 0x10]
push 0x400
push eax
lea esi, [esp + 0x40]
push esi
call fcn.0047b8b0
add esp, 0xc
push esi
call fcn.0042a680
add esp, 4
mov eax, dword [0x57aea0]
mov ecx, dword [0x579028]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x486361
mov eax, dword [0x57ae98]
cmp eax, dword [0x57ae9c]
je 0x4863d3
mov dword [esp + 0x20], 0xffffffff
mov eax, dword [0x57aea0]
mov ecx, dword [0x579028]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x486397
mov eax, dword [0x57ae9c]
test eax, eax
mov ecx, dword [0x57ae94]
cmove eax, ecx
dec eax
cmp ecx, eax
jb 0x4863d6
shl eax, 2
add eax, dword [0x57ae90]
lea ecx, [esp + 0x20]
push eax
call fcn.00487a10
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4862a3
cmp byte [esp + 0x1b], 0
jns 0x4861f6
mov edi, dword [esp + 0x10]
jmp 0x4861fa
lea edi, [esp + 0x10]
mov ebx, edi
add ebx, dword [esp + 8]
mov dword [esp + 4], eax
je 0x486211
push ebx
call fcn.00520da0
add esp, 4
jmp 0x486213
xor eax, eax
mov edx, dword [esp]
mov ecx, dword [edx + 0x90]
mov esi, dword [esp + 8]
sub esi, ecx
js 0x4863d9
add edi, ecx
mov ecx, dword [edx + 0x94]
mov edx, dword [edx + 0x98]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], eax
mov eax, 1
mov esi, dword [esp + 4]
lock xadd dword [esi], eax
test eax, eax
jle 0x4863dc
mov dword [esp + 8], ecx
cmp eax, 0x7fffffff
mov ebx, dword [esp + 0xc]
je 0x4863df
mov edi, edx
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
call dword [section..00cfg]
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x28]
push eax
push edi
push dword [esp + 0x14]
push esi
call ecx
add esp, 0x14
lock dec dword [esi]
mov edi, dword [esp]
jne 0x4862a3
push esi
call fcn.00487970
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00487a40
cmp byte [esp + 0x1b], 0
jns 0x4862bf
push dword [esp + 0x10]
call fcn.00507dc6
add esp, 4
lea ecx, [edi + 0x9c]
call fcn.004c9c30
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov dword [edi + eax + 8], 0x5587b0
mov dword [edi + 0xc], 0x5587c0
cmp byte [edi + 0x37], 0
jns 0x4862f0
push dword [edi + 0x2c]
call fcn.00507dc6
add esp, 4
add edi, 0x40
mov ecx, ebx
call fcn.0042a34a
mov ecx, ebx
call fcn.0042a680
mov ecx, edi
call fcn.0042a340
mov ecx, dword [esp + 0x438]
xor ecx, ebp
call fcn.00508d63
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x57aeac
call fcn.00507e37
add esp, 4
cmp dword [0x57aeac], 0xffffffff
jne 0x485f4a
push 0x400
push str.LOG_FATAL
call fcn.004776d0
add esp, 8
mov dword [0x57aea8], eax
push 0x57aeac
call fcn.00507ead
add esp, 4
jmp 0x485f4a
push 0x57aea0
call fcn.00507e37
add esp, 4
cmp dword [0x57aea0], 0xffffffff
jne 0x486177
xorps xmm0, xmm0
movups xmmword [0x57ae90], xmm0
push 0x57aea0
call fcn.00507ead
add esp, 4
jmp 0x486177
push 0x57aea0
call fcn.00507e37
add esp, 4
cmp dword [0x57aea0], 0xffffffff
jne 0x4861b1
xorps xmm0, xmm0
movups xmmword [0x57ae90], xmm0
push 0x57aea0
call fcn.00507ead
add esp, 4
jmp 0x4861b1
int3
int3
int3
int3
int3
int3
int3