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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
mov esi, ecx
mov eax, dword [0x4ad040]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
dec eax
lea ecx, [ebp - 0x34]
mov dword [ecx], eax
mov dword [ecx + 4], eax
call fcn.004365f0
lea eax, [esi + 8]
mov dword [ebp - 0x50], eax
lea ecx, [esi + 0xc]
lea edi, [ebp - 0x40]
mov dword [ebp - 0x5c], ecx
push edi
call fcn.00424cf0
lea eax, [ebp - 0x4c]
lea ebx, [ebp - 0x1c]
mov ecx, ebx
push eax
push edi
call fcn.00424b40
movsx eax, byte [ebx + 0xb]
test eax, eax
jns 0x485784
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x58], eax
jns 0x485794
push dword [ebp - 0x1c]
call fcn.00446eb7
add esp, 4
mov eax, dword [esi + 8]
mov ecx, dword [eax + 4]
add ecx, dword [ebp - 0x50]
lea edi, [ebp - 0x1c]
push edi
call fcn.0042be50
mov ecx, edi
push 0x4b13f8
call fcn.0042f460
mov edi, eax
mov eax, dword [eax]
mov dword [ebp - 0x54], esi
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x4a8f98]
mov ecx, edi
push 0xa
call esi
mov ebx, eax
lea esi, [ebp - 0x1c]
mov ecx, esi
call fcn.0042bfe0
movsx eax, bl
mov edi, dword [ebp - 0x50]
mov ecx, edi
push eax
call fcn.0046d6d0
mov ecx, edi
call fcn.0046d040
xor edi, edi
dec edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov ecx, dword [ebp - 0x5c]
push esi
call fcn.00424cf0
lea ebx, [ebp - 0x40]
mov ecx, ebx
lea eax, [ebp - 0x4c]
push eax
push esi
call fcn.00424b40
lea ecx, [ebp - 0x4c]
push esi
mov esi, dword [ebp - 0x54]
push edi
push dword [esi + 0x90]
push ebx
call fcn.0042fc10
mov eax, dword [esi + 0x94]
mov ecx, dword [esi + 0x98]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0x57
mov eax, dword [0x4a39f4]
mov al, byte [eax + 0x57]
test al, al
jne 0x485a19
cmp byte [ebp - 0x41], 0
jns 0x48585d
push dword [ebp - 0x4c]
call fcn.00446eb7
add esp, 4
cmp dword [esi + 4], 3
jne 0x485871
mov bl, byte [0x4b1a30]
test bl, bl
je 0x48599a
mov ecx, dword [0x4b1a0c]
test ecx, ecx
je 0x4858b2
mov eax, dword [esi + 4]
mov dword [ebp - 0x50], eax
mov edi, dword [esi + 0x90]
mov ebx, dword [esi + 0x98]
mov eax, dword [ebp - 0x54]
mov esi, dword [eax + 0x94]
call dword [0x4a8f98]
lea eax, [ebp - 0x40]
push eax
push edi
push ebx
push esi
mov esi, dword [ebp - 0x54]
push dword [ebp - 0x50]
call ecx
add esp, 0x14
test al, al
jne 0x485923
mov eax, dword [0x4aecc4]
test al, 2
je 0x4858d3
cmp byte [ebp - 0x35], 0
lea eax, [ebp - 0x40]
jns 0x4858c7
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x4aecc4]
test al, 4
jne 0x4858e4
test eax, 0xfffffffa
jne 0x48591c
cmp dword [esi + 4], 2
jl 0x48591c
lea esi, [ebp - 0x40]
movsx edi, byte [esi + 0xb]
test edi, edi
cmovs edi, dword [esi + 4]
cmovs esi, dword [esi]
test edi, edi
je 0x48591c
xor ebx, ebx
mov eax, edi
sub eax, ebx
lea ecx, [esi + ebx]
push eax
push ecx
push 2
call fcn.004592c0
add esp, 0xc
test eax, eax
js 0x485917
add ebx, eax
cmp ebx, edi
jb 0x4858fa
mov eax, dword [0x4aecc4]
test al, 1
mov esi, dword [ebp - 0x54]
jne 0x485964
cmp dword [esi + 4], 3
je 0x485954
cmp byte [ebp - 0x35], 0
jns 0x48593a
push dword [ebp - 0x40]
call fcn.00446eb7
add esp, 4
lea ecx, [ebp - 0x34]
call fcn.00436620
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00447963
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x58]
call fcn.00485b50
jmp 0x485929
call fcn.004850d0
test al, al
je 0x485923
lea eax, [ebp - 0x40]
movsx ecx, byte [eax + 0xb]
test ecx, ecx
cmovs ecx, dword [eax + 4]
mov dword [ebp - 0x1c], 0xffffffff
cmovs eax, dword [eax]
push 0
lea edx, [ebp - 0x1c]
push edx
push ecx
push eax
push dword [0x4b1a00]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x485923
mov byte [0x4b1a30], 1
mov eax, dword [0x4b1a38]
mov ecx, dword [0x4b00d0]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x485a4e
mov ecx, esi
lea edi, [ebp - 0x1c]
push edi
call fcn.00485aa0
movsx eax, byte [ebp - 0x11]
mov ecx, edi
test eax, eax
jns 0x4859dd
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
test eax, eax
js 0x485a4c
sete dl
test ecx, ecx
setne dh
or dh, dl
je 0x485a4c
push eax
push ecx
push dword [0x4b1a34]
call fcn.0041acf0
add esp, 0xc
cmp byte [ebp - 0x11], 0
jns 0x485a0e
push dword [ebp - 0x1c]
call fcn.00446eb7
add esp, 4
mov byte [0x4b1a30], bl
jmp 0x485871
movzx ecx, al
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
mov dword [eax], str.LogMessage
lea edx, [ebp - 0x2c]
lea edi, [ebp - 0x1c]
push edi
push eax
call fcn.00486020
add esp, 8
jmp 0x48584c
ud2
push 0x4b1a38
call fcn.00446ef1
add esp, 4
cmp dword [0x4b1a38], 0xffffffff
jne 0x4859c2
push 0x400
push str.LOG_FATAL
call fcn.0041acb0
add esp, 8
mov dword [0x4b1a34], eax
push 0x4b1a38
call fcn.00446f6b
add esp, 4
jmp 0x4859c2